perm filename DEMO.XGP[RDG,DBL]1 blob
sn#539140 filedate 1980-10-08 generic text, type T, neo UTF8
/FONT#0=NONM/FONT#1=NONMI/FONT#2=NONMB/FONT#6=NON44/TMAR=200/PMAR=1998/BMAR=2
␈↓ ∞␈β↓↓␈¬G-1
␈↓ ∧;␈β↓H␈¬εAppendix G - Sample Session
␈↓ α_␈βα ␈¬↓This␈α∂appendix␈α∂shows␈α∂a␈α∂session␈α∞the␈α∞author␈α∞had␈α∞with␈α∞the␈α∞current␈α∞RLL-1␈α∞system.␈α∞This␈α∞is
␈↓ ↓H␈βα>␈¬↓designed␈α
to␈α
provide␈α
a␈α
flavor␈α
of␈α
RLL-1's␈α
capabilities,␈α
as␈αwell␈αas␈αdescribe␈αthe␈αformats␈αfor␈αits
␈↓ ↓H␈βα\␈¬↓various␈α
commands.␈α
Comments␈α
are␈α
shown␈α
enclosed␈α
in␈α
braces,␈α
"{}"s.
␈↓ ¬+␈ββ_␈¬εTable of Contents
␈↓ ↓H␈ββb␈¬α SubSection␈↓ β8Page␈↓ ¬(Topic
␈↓ ↓H␈β∧≡␈¬↓ 1.␈↓ αh 79␈↓ ∧λ Starting the system
␈↓ ↓H␈β∧<␈¬↓ 2.␈↓ αh 81␈↓ ∧λ What was created?
␈↓ ↓H␈β∧Z␈¬↓ 3.␈↓ αh 82␈↓ ∧λ Looking around
␈↓ ↓H␈β∧x␈¬↓ 4.␈↓ αh 82␈↓ ∧λ Creating a new class
␈↓ ↓H␈β¬⊗␈¬↓ 5.␈↓ αh 83␈↓ ∧λ Creating a new typical example, for a class
␈↓ ↓H␈β¬4␈¬↓ 6.␈↓ αh 85␈↓ ∧λ Slot verification by EDITU
␈↓ ↓H␈β¬R␈¬↓ 7.␈↓ αh 86␈↓ ∧λ Examining unit which represent Formats
␈↓ ↓H␈β¬p␈¬↓ 8.␈↓ αh 87␈↓ ∧λ Adding on a new person
␈↓ ↓H␈βε∞␈¬↓ 9.␈↓ αh 87␈↓ ∧λ Creating a new entity - HisMother
␈↓ ↓H␈βε,␈¬↓ 10.␈↓ αh 88␈↓ ∧λ How are new units created?
␈↓ ↓H␈βεJ␈¬↓ 11.␈↓ αh 88␈↓ ∧λ Hack to LISP's evaluator
␈↓ ↓H␈βεh␈¬↓ 12.␈↓ αh 89␈↓ ∧λ Creating a new datatype - GenderType
␈↓ ↓H␈βπε␈¬↓ 13.␈↓ αh 89␈↓ ∧λ Engendering our visitor
␈↓ ↓H␈βπ$␈¬↓ 14.␈↓ αh 90␈↓ ∧λ Indicating that Mothers are female
␈↓ ↓H␈βπB␈¬↓ 15.␈↓ αh 92␈↓ ∧λ Add another person
␈↓ ↓H␈βπ`␈¬↓ 16.␈↓ αh 92␈↓ ∧λ Can a male be a mother?
␈↓ ↓H␈βπ}␈¬↓ 17.␈↓ αh 93␈↓ ∧λ Now make Husbands male:
␈↓ ↓H␈βλ≤␈¬↓ 18.␈↓ αh 93␈↓ ∧λ To give HisMother a Husband
␈↓ ↓H␈βλ:␈¬↓ 19.␈↓ αh 94␈↓ ∧λ Create a new type of slot - Father
␈↓ ↓H␈βλX␈¬↓ 20.␈↓ αh 94␈↓ ∧λ There is a unit for Composition:
␈↓ ↓H␈βλv␈¬↓ 21.␈↓ αh 96␈↓ ∧λ Examples of SlotCombiners
␈↓ ↓H␈β ∀␈¬↓ 22.␈↓ αh 97␈↓ ∧λ What else can we say about Father?
␈↓ ↓H␈β 2␈¬↓ 23.␈↓ αh 97␈↓ ∧λ Far too quiet:
␈↓ ↓H␈β P␈¬↓ 24.␈↓ αh 97␈↓ ∧λ How do accessing functions really work?
␈↓ ↓H␈β n␈¬↓ 25.␈↓ αh 98␈↓ ∧λ The FindDefault function:
␈↓ ↓H␈β
␈¬↓ 26.␈↓ αh 98␈↓ ∧λ Strategy:
␈↓ ↓H␈β
*␈¬↓ 27.␈↓ αh 99␈↓ ∧λ What gets done when? - system dependent fns
␈↓ ↓H␈β
H␈¬↓ 28.␈↓ αh 100␈↓ ∧λ Creating a new function
␈↓ ↓H␈β
f␈¬↓ 29.␈↓ αh 101␈↓ ∧λ New class of types of slots - ChattySlots
␈↓ ↓H␈β∧␈¬↓ 30.␈↓ αh 102␈↓ ∧λ Create a new typical member of AnyChattySlot
␈↓ ↓H␈β"␈¬↓ 31.␈↓ αh 102␈↓ ∧λ Conclusion
␈↓ ↓⊗␈β↓↓␈¬G-2
␈↓ ∧4␈β↓H␈¬↓<<<< 1. Starting the system >>>>
␈↓ ↓H␈β↓f␈¬[I adviced USERNAME to return "NewUser" for this.]
␈↓ ↓H␈βα"␈¬@<CSD.IA>DEMO.EXE
␈↓ ↓H␈βα↑␈¬Shall I start the RLL system now? yes
␈↓ ↓H␈ββ~␈¬ *** Am opening Dribble file: TRACE.Aug18 [18-Aug-80 13:38:45]
␈↓ ↓H␈ββV␈¬Reading in RLL.STATUS now.
␈↓ ↓H␈β∧∩␈¬Opening knowledge base <CSD.RLL>RLL.KB.12
␈↓ ↓H␈β∧N␈¬Opening paging file <CSD.IA>RLL.PAGE.1
␈↓ ↓H␈β¬
␈¬Loading unit RLL.UNITINDEX
␈↓ ↓H␈β¬F␈¬Loading unit RLL.STATUS
␈↓ ↓H␈βεα␈¬Last written by (CSD.GREINER 16-Aug-80 22:18:15)
␈↓ ↓H␈βε>␈¬{{Loading unit KBsFNS
␈↓ ↓H␈βε\␈¬Loading unit AllIsas
␈↓ ↓H␈βεz␈¬Loading unit ToGetValue
␈↓ ↓H␈βπ_␈¬Loading unit OrderedPrototypes
␈↓ ↓H␈βπ6␈¬Loading unit Defn
␈↓ ↓H␈βπT␈¬Loading unit Prototypes
␈↓ ↓H␈βπr␈¬Loading unit MySlotsNowOrdered
␈↓ ↓H␈βλ⊂␈¬Loading unit TypicalPrimSlot
␈↓ ↓H␈βλ.␈¬Loading unit TypicalSlot
␈↓ ↓H␈βλL␈¬Loading unit BeforeGetValue
␈↓ ↓H␈βλj␈¬Loading unit AfterGetValue
␈↓ ↓H␈β λ␈¬Loading unit KBsVARS
␈↓ ↓H␈β &␈¬Loading unit KBsConnectedTo}}
␈↓ ↓H␈β b␈¬This kb, RLL is already connected to all of (RLL).
␈↓ ↓H␈β
≡␈¬Do you wish to read in any Knowledge Bases? yes
␈↓ ↓H␈β
Z␈¬{{Loading unit AllExamples
␈↓ ↓H␈β
x␈¬Loading unit AnyUser
␈↓ ↓H␈β⊗␈¬Loading unit UserNames
␈↓ ↓H␈β4␈¬Loading unit RussGreiner
␈↓ ↓H␈βR␈¬Loading unit DougLenat
␈↓ ↓H␈βp␈¬Loading unit LarryHines
␈↓ ↓H␈β∞␈¬Loading unit AndyFreeman}}
␈↓ ↓H␈βJ␈¬I don't know who you are!
␈↓ ↓H␈β
ε␈¬Shall I create a unit to store information about you? yes
␈↓ ↓H␈β
B␈¬Is NewUser an appropriate name? no
␈↓ ↓H␈β
}␈¬What name would you prefer? Visitor
␈↓ ↓H␈β∞:␈¬{{Loading unit GetPossibleSlotsFn
␈↓ ↓H␈β∞X␈¬Loading unit IExamples
␈↓ ↓H␈β∞v␈¬Loading unit LispFn
␈↓ ↓H␈β∂∀␈¬Loading unit TypicalVirtualSlot
␈↓ ↓H␈β∂2␈¬Loading unit PossibleSlotsOfIExamples
␈↓ ∞␈β↓↓␈¬G-3
␈↓ ↓H␈β↓H␈¬Loading unit StoredAList
␈↓ ↓H␈β↓f␈¬Loading unit GenlsModels
␈↓ ↓H␈βα∧␈¬Loading unit SuperClass*
␈↓ ↓H␈βα"␈¬Loading unit TypicalExample
␈↓ ↓H␈βα@␈¬Loading unit Anything
␈↓ ↓H␈βα↑␈¬Loading unit AnyCT&U
␈↓ ↓H␈βα|␈¬Loading unit NewPossibleSlots
␈↓ ↓H␈ββ~␈¬Loading unit TypicalCT&U
␈↓ ↓H␈ββ8␈¬Loading unit MyCreator
␈↓ ↓H␈ββV␈¬Loading unit MyTimeOfCreation
␈↓ ↓H␈ββt␈¬Loading unit MyToKillMe
␈↓ ↓H␈β∧∩␈¬Loading unit TypicalAccessSlot
␈↓ ↓H␈β∧0␈¬Loading unit MyToRenameMe
␈↓ ↓H␈β∧N␈¬Loading unit MyEssentialVirtualSlots
␈↓ ↓H␈β∧l␈¬Loading unit MySensibleSlots
␈↓ ↓H␈β¬
␈¬Loading unit MyCreatedAs
␈↓ ↓H␈β¬(␈¬Loading unit MySlots
␈↓ ↓H␈β¬F␈¬Loading unit TypicalThing
␈↓ ↓H␈β¬d␈¬Loading unit Specializations
␈↓ ↓H␈βεα␈¬Loading unit TypicalUnitFn
␈↓ ↓H␈βε ␈¬Loading unit TypicalStorableFn
␈↓ ↓H␈βε>␈¬Loading unit TypicalFunction
␈↓ ↓H␈βε\␈¬Loading unit TypicalProcess
␈↓ ↓H␈βεz␈¬Loading unit Isa
␈↓ ↓H␈βπ_␈¬Loading unit AllGenls
␈↓ ↓H␈βπ6␈¬Loading unit AllSpecs
␈↓ ↓H␈βπT␈¬Loading unit Characteristics
␈↓ ↓H␈βπr␈¬Loading unit Descr
␈↓ ↓H␈βλ⊂␈¬Loading unit TypicalUser
␈↓ ↓H␈βλ.␈¬Loading unit InformalName
␈↓ ↓H␈βλL␈¬Loading unit UsualKBs
␈↓ ↓H␈βλj␈¬Loading unit WritingOptions
␈↓ ↓H␈β λ␈¬Loading unit OpenningOptions
␈↓ ↓H␈β &␈¬Loading unit OrderForToInit
␈↓ ↓H␈β D␈¬Loading unit Typical$SELF$Slot
␈↓ ↓H␈β b␈¬Loading unit ToAddValue
␈↓ ↓H␈β
␈¬Loading unit BeforePutValue
␈↓ ↓H␈β
≡␈¬Loading unit VerifyElement
␈↓ ↓H␈β
<␈¬Loading unit Format
␈↓ ↓H␈β
Z␈¬Loading unit FnForPutting
␈↓ ↓H␈β
x␈¬Loading unit FSet
␈↓ ↓H␈β⊗␈¬Loading unit SuperTypEx*
␈↓ ↓H␈β4␈¬Loading unit TypicalExampleOf
␈↓ ↓H␈βR␈¬Loading unit SuperClass
␈↓ ↓H␈βp␈¬Loading unit FnForAdding
␈↓ ↓H␈β∞␈¬Loading unit ToCache
␈↓ ↓H␈β,␈¬Loading unit ToPutValue
␈↓ ↓H␈βJ␈¬Loading unit AfterPutValue
␈↓ ↓H␈βh␈¬Loading unit Inverse
␈↓ ↓H␈β
ε␈¬Loading unit KBUpdates
␈↓ ↓H␈β
$␈¬Loading unit Examples
␈↓ ↓H␈β
B␈¬Loading unit AllTypicalExampleOfs}}
␈↓ ↓H␈β
}␈¬ 1 -- RESOL
␈↓ ↓H␈β∞≤␈¬ 2 -- GENLINFO
␈↓ ↓H␈β∞:␈¬ 3 -- BIOLOGY
␈↓ ↓H␈β∞X␈¬ 4 -- SETS
␈↓ ↓H␈β∞v␈¬ 5 -- MATH
␈↓ ↓H␈β∂∀␈¬ 6 -- NUMBER
␈↓ ↓H␈β∂2␈¬ 7 -- HOBBIT
␈↓ ↓⊗␈β↓↓␈¬G-4
␈↓ ↓H␈β↓H␈¬ 8 -- HEURS
␈↓ ↓H␈β↓f␈¬ 9 -- OLD
␈↓ ↓H␈βα∧␈¬ 10 -- EURISKO
␈↓ ↓H␈βα@␈¬Enter the numbers of the ones you wish to use: 2
␈↓ ↓H␈βα|␈¬{{Loading unit FunctionSpec
␈↓ ↓H␈ββ~␈¬ Loading unit HighLevelDefn
␈↓ ↓H␈ββ8␈¬ Loading unit DomainType
␈↓ ↓H␈ββV␈¬ Loading unit FList}}
␈↓ ↓H␈β∧∩␈¬Opening knowledge base <CSD.RLL>GENLINFO.KB.4
␈↓ ↓H␈β∧N␈¬Opening paging file <CSD.IA>GENLINFO.PAGE.1
␈↓ ↓H␈β¬
␈¬{{Loading unit GENLINFO.UNITINDEX
␈↓ ↓H␈β¬(␈¬ Loading unit GENLINFO.STATUS}}
␈↓ ↓H␈β¬d␈¬Last written by (CSD.HINES 31-Jul-80 15:38:24)
␈↓ ↓H␈βε ␈¬Network RLL already open.
␈↓ ↓H␈βε\␈¬This kb, GENLINFO is already connected to all of (GENLINFO RLL).
␈↓ ↓H␈βπ_␈¬KBs loaded.
␈↓ ↓H␈βπT␈¬(<CSD.IA>DEMO.EXE.3 . <LISP>LISP.EXE.133)
␈↓ ∧8␈βλ⊂␈¬↓<<<< 2. What was created? >>>>
␈↓ ↓H␈βλL␈¬ {Turn off those obnoxious Loading, ... messages}
␈↓ ↓H␈β λ␈¬99←(SETQ UP.TRACEFILE NIL]
␈↓ ↓H␈β &␈¬(UP.TRACEFILE reset)
␈↓ ↓H␈β D␈¬NIL
␈↓ α_␈β
␈¬{Now look at what was just created}
␈↓ ↓H␈β
<␈¬100←EDITU(Visitor]
␈↓ ↓H␈β
Z␈¬edit
␈↓ ↓H␈β⊗␈¬98*pp
␈↓ α_␈β4␈¬{Note this is a property list, of the form (slot1 value1 slot1 value2 ...}
␈↓ ↓H␈βp␈¬(Isa (AnyUser)
␈↓ ↓H␈β∞␈¬UserNames ("NewUser")
␈↓ ↓H␈β,␈¬AllIsas (AnyCT&U Anything AnyUser)
␈↓ ↓H␈βJ␈¬Prototypes (TypicalUser TypicalCT&U TypicalThing)
␈↓ ↓H␈βh␈¬MySlotsNowOrdered (OrderedPrototypes)
␈↓ α_␈β
ε␈¬{NOTE: Slots beginning with "My" are syntactic.}
␈↓ ↓H␈β
$␈¬UsualKBs (RLL)
␈↓ ↓H␈β
B␈¬MyCreatedAs (IExamples (AnyUser))
␈↓ ↓H␈β
`␈¬MyTimeOfCreation "18-Aug-80 13:40:23"
␈↓ ↓H␈β
}␈¬MyCreator "NewUser"
␈↓ ↓H␈β∞≤␈¬OpenningOptions NoEntries
␈↓ ↓H␈β∞:␈¬MySensibleSlots (Descr Characteristics Prototypes AllSpecs AllGenls AllIsas Isa
␈↓ ↓H␈β∞X␈¬ OrderedPrototypes Specializations MySlots MyCreatedAs
␈↓ ↓H␈β∞v␈¬ MySensibleSlots MySlotsNowOrdered MyEssentialVirtualSlots
␈↓ ↓H␈β∂∀␈¬ MyToRenameMe MyToKillMe MyTimeOfCreation MyCreator UserNames
␈↓ ↓H␈β∂2␈¬ OpenningOptions WritingOptions UsualKBs InformalName))
␈↓ ∞␈β↓↓␈¬G-5
␈↓ ↓H␈βα∧␈¬98*ok
␈↓ ↓H␈βα"␈¬Nothing changed.
␈↓ ↓H␈βα@␈¬Visitor
␈↓ ∧Q␈βα|␈¬↓<<<< 3. Looking around >>>>
␈↓ α_␈ββ8␈¬{Let's see the top level units:}
␈↓ ↓H␈ββt␈¬1←DI(Anything S 2]
␈↓ ↓H␈β∧0␈¬Note the trace flag has been turned off.
␈↓ ↓H␈β∧l␈¬ Anything
␈↓ ↓H␈β¬
␈¬ AnyAT&U
␈↓ ↓H␈β¬(␈¬ AnyAbstractThing
␈↓ ↓H␈β¬F␈¬ AnyCT&U
␈↓ ↓H␈β¬d␈¬ AnyConcreteThing
␈↓ ↓H␈βεα␈¬ AnyUnit
␈↓ ↓H␈βε>␈¬!DONE!
␈↓ α_␈βεz␈¬{This showed the subclasses of Anything, down (a total of) two levels
␈↓ α_␈βπ_␈¬ The ...&U units are hacks, to store both the unit and its meta-unit
␈↓ α_␈βπ6␈¬ in the same physical unit.
␈↓ α_␈βπr␈¬ More interesting is:}
␈↓ ↓H␈βλ.␈¬2←DI(AnyCT&U S 2]
␈↓ ↓H␈βλj␈¬Note the trace flag has been turned off.
␈↓ ↓H␈β &␈¬ AnyCT&U
␈↓ ↓H␈β D␈¬ AnyClassOfObjects
␈↓ ↓H␈β b␈¬ AnyDatatype
␈↓ ↓H␈β
␈¬ AnyDecomposableObject
␈↓ ↓H␈β
≡␈¬ AnyFormat
␈↓ ↓H␈β
<␈¬ AnyInheritance
␈↓ ↓H␈β
Z␈¬ AnyIntensionalObject
␈↓ ↓H␈β
x␈¬ AnyOverhead
␈↓ ↓H␈β⊗␈¬ AnyProcess
␈↓ ↓H␈β4␈¬ AnyUnit
␈↓ ↓H␈βR␈¬ AnyUser
␈↓ ↓H␈β∞␈¬!DONE!
␈↓ ∧*␈βJ␈¬↓<<<< 4. Creating a new class >>>>
␈↓ α_␈β
ε␈¬{Let us create a new unit - which refers to people:}
␈↓ ↓H␈β
$␈¬4←NewSpec(AnyPerson]
␈↓ ↓H␈β
B␈¬Is a ISubClass of: AnyCT&U
␈↓ ↓H␈β
`␈¬Please enter the Knowledge Base in which to store AnyPerson: GENLINFO
␈↓ ↓H␈β∞≤␈¬Is the format of (LAMBDA (units sl? oth?) (MapUnion (IsOk units)
␈↓ ↓H␈β∞:␈¬(FUNCTION (LAMBDA (x) (GetValue x (QUOTE Prototypes) (AddOnCharacter
␈↓ ↓H␈β∞X␈¬oth? (QUOTE VERYSAFESLOT))))))) a list?
␈↓ ↓H␈β∞v␈¬yes
␈↓ α_␈β∂2␈¬{Here, RLL is asking about the Format of the expression (LAMBDA ...).
␈↓ ↓⊗␈β↓↓␈¬G-6
␈↓ α_␈β↓H␈¬ This was because it didn't know about the function "MapUnion".
␈↓ α_␈β↓f␈¬ It will, later in RLL's development.}
␈↓ ↓H␈βα"␈¬You are about to write on an external file.
␈↓ ↓H␈βα↑␈¬Do you want to enter ReadOnly mode? no
␈↓ α_␈ββ~␈¬{Before the first write, RLL gives the user a chance to leave
␈↓ α_␈ββ8␈¬ the systems unmodified. Here, we told RLL to go ahead.}
␈↓ ↓H␈ββV␈¬ * Initialized AnyPerson *
␈↓ ↓H␈ββt␈¬edit
␈↓ ↓H␈β∧0␈¬99*p
␈↓ ↓H␈β∧l␈¬(Isa (AnyClassOfObjects)
␈↓ ↓H␈β¬
␈¬AllIsas (AnyCT&U Anything AnyClassOfObjects)
␈↓ ↓H␈β¬(␈¬Prototypes (TypicalClass TypicalCT&U TypicalThing)
␈↓ ↓H␈β¬F␈¬MySlotsNowOrdered (OrderedPrototypes)
␈↓ ↓H␈β¬d␈¬MyCreatedAs (ISubClass &)
␈↓ ↓H␈βεα␈¬MyTimeOfCreation "18-Aug-80 13:50:28"
␈↓ ↓H␈βε ␈¬MyCreator "NewUser"
␈↓ ↓H␈βε>␈¬TotalSoFar 0
␈↓ ↓H␈βε\␈¬SuperClass (AnyCT&U)
␈↓ ↓H␈βεz␈¬MySensibleSlots (Descr Characteristics Prototypes AllSpecs AllGenls
␈↓ αh␈βπ_␈¬AllIsas Isa OrderedPrototypes Specializations MySlots MyCreatedAs
␈↓ αh␈βπ6␈¬MySensibleSlots MySlotsNowOrdered MyEssentialVirtualSlots
␈↓ αh␈βπT␈¬MyToRenameMe MyToKillMe MyTimeOfCreation MyCreator TotalSoFar --))
␈↓ α_␈βπr␈¬{ ↑ These are slots which are well defined for this unit.}
␈↓ ↓H␈βλ.␈¬ *** Am re-opening Dribble file: TRACE.Aug18 [18-Aug-80 13:53:01]
␈↓ α_␈βλj␈¬{↑ A dribble file records the session. (You're looking at it now.]
␈↓ α_␈β λ␈¬{ This class unit looks }
␈↓ ↓H␈β &␈¬100*ok
␈↓ ↓H␈β D␈¬Verifying slots
␈↓ ↓H␈β b␈¬AnyPerson
␈↓ β∞␈β
<␈¬↓<<<< 5. Creating a new typical example, for a class >>>>
␈↓ α_␈β
x␈¬{Now we'll create a unit which hold facts typically true of any person.
␈↓ α_␈β⊗␈¬ (That is, default values; as well as a list of new slots to be inherited
␈↓ α_␈β4␈¬ by every new person.]}
␈↓ ↓H␈βp␈¬5←NewTypEx]
␈↓ ↓H␈β∞␈¬Name: TypicalPerson
␈↓ ↓H␈β,␈¬Is a ITypEx of: AnyPerson
␈↓ ↓H␈βJ␈¬Please enter the Knowledge Base in which to store TypicalPerson: GENLINFO
␈↓ ↓H␈β
ε␈¬Is the format of (LAMBDA (units sl? oth?) (MapUnion (IsOk units) (FUNCTION (LAMBDA
␈↓ ↓H␈β
$␈¬(uNITcomp sLOTcomp oTHERcomp) (OR (MapUnion (GetValue uNITcomp (QUOTE GenlsModels)
␈↓ ↓H␈β
B␈¬(AddOnCharacter oTHERcomp (QUOTE VERYSAFESLOT)))
␈↓ ↓H␈β
`␈¬(LAMBDA (x) (GetValue x (QUOTE Prototypes) (AddOnCharacter oTHERcomp
␈↓ ↓H␈β
}␈¬(QUOTE VERYSAFESLOT)))))) NoEntries)))))
␈↓ ↓H␈β∞≤␈¬a list?
␈↓ ↓H␈β∞:␈¬yes
␈↓ α_␈β∞v␈¬{No, RLL still doesn't know about MapUnion.}
␈↓ ↓H␈β∂∀␈¬Shall I create a slot with the high level defn:
␈↓ ↓H␈β∂2␈¬(Composition TypicalExample SubClass*)? no
␈↓ ∞␈β↓↓␈¬G-7
␈↓ α_␈β↓f␈¬{To update inverse links, it has to "invert" each relevant slot.
␈↓ α_␈βα∧␈¬ For this it uses that slot's high level definition... which goes to
␈↓ α_␈βα"␈¬ the slot combiners involved, ...
␈↓ α_␈βα@␈¬ Above it was inverting GenlsModels, whose HighLevelDefn was
␈↓ α_␈βα↑␈¬ (Composition SuperClass* TypicalExampleOf]
␈↓ α_␈ββ~␈¬ RLL was asking whether to preserve this definition as or slot, or not.
␈↓ α_␈ββ8␈¬ I said NO.}
␈↓ ↓H␈ββV␈¬ * Initialized TypicalPerson *
␈↓ ↓H␈ββt␈¬edit
␈↓ ↓H␈β∧0␈¬1*p
␈↓ ↓H␈β∧l␈¬(Isa (AnyArchetype)
␈↓ ↓H␈β¬
␈¬ TypicalExampleOf AnyPerson
␈↓ ↓H␈β¬(␈¬ NewPossibleSlots NoEntries
␈↓ ↓H␈β¬F␈¬ AllIsas (AnyIntensionalObject AnyCT&U Anything AnyAT&U AnyArchetype)
␈↓ ↓H␈β¬d␈¬ Prototypes (TypicalTypicalEx TypicalCT&U TypicalAT&U TypicalThing)
␈↓ ↓H␈βεα␈¬ MySlotsNowOrdered (OrderedPrototypes)
␈↓ ↓H␈βε ␈¬ MyCreatedAs (ITypEx &)
␈↓ ↓H␈βε>␈¬ MyTimeOfCreation "18-Aug-80 13:59:43"
␈↓ ↓H␈βε\␈¬ MyCreator "NewUser"
␈↓ ↓H␈βεz␈¬ MySensibleSlots (Descr Characteristics Prototypes AllSpecs
␈↓ αh␈βπ_␈¬ AllGenls AllIsas Isa OrderedPrototypes Specializations MySlots
␈↓ αh␈βπ6␈¬ MyCreatedAs MySensibleSlots MySlotsNowOrdered
␈↓ αh␈βπT␈¬ MyEssentialVirtualSlots MyToRenameMe MyToKillMe MyTimeOfCreation
␈↓ αh␈βπr␈¬ MyCreator SubTypEx* SuperTypEx* SubTypEx SuperTypEx
␈↓ αh␈βλ⊂␈¬ TypicalExampleOf NewPossibleSlots PossibleSlots))
␈↓ α_␈βλL␈¬{↑ These slots are pertanent to all prototypes, such as this TypicalPerson.
␈↓ α_␈βλj␈¬ RLL determined these using from the prototypical prototype,
␈↓ α_␈β λ␈¬ TypicalTypicalEx.}
␈↓ ↓H␈β &␈¬2*5 up p
␈↓ ↓H␈β D␈¬... NewPossibleSlots NoEntries
␈↓ α_␈β
␈¬{↑ Its value lists the new slots, which all people will have.}
␈↓ α_␈β
<␈¬{Currently it is empty.
␈↓ α_␈β
Z␈¬ (Note we use "NoEntries" to indicate a list we know is empty,
␈↓ α_␈β
x␈¬ leaving NIL to mean a value we simply don't know.]}
␈↓ ↓H␈β⊗␈¬3*(2 (Mother Husband))
␈↓ α_␈βR␈¬{Now new examples of AnyPerson will have these two slots.}
␈↓ ↓H␈βp␈¬4*bk (b Mother NoEntry Husband NoEntry]
␈↓ ↓H␈β,␈¬5*p
␈↓ ↓H␈βh␈¬... Mother NoEntry Husband NoEntry NewPossibleSlots (Mother Husband) ...
␈↓ α_␈β
$␈¬{(NoEntry is like NoEntries in purpose. It, however,
␈↓ α_␈β
B␈¬ refers to the absense of a single entry.]
␈↓ α_␈β
}␈¬ Here, it is used to indicate that TypicalPerson cannot
␈↓ α_␈β∞≤␈¬ provide any sort of default information about a new unit's relatives.
␈↓ α_␈β∞X␈¬It also causes RLL to consider creating a Mother (resp. Husband)
␈↓ α_␈β∞v␈¬ type of slot. This is done in EDITU.}
␈↓ ↓H␈β∂∀␈¬6*ok
␈↓ ↓⊗␈β↓↓␈¬G-8
␈↓ ∧λ␈β↓H␈¬↓<<<< 6. Slot verification by EDITU >>>>
␈↓ ↓H␈βα∧␈¬Verifying slots
␈↓ ↓H␈βα"␈¬Your attempted slot name Mother is NOT even a unit. Should it be? yes
␈↓ α_␈βα@␈¬{This will create a new unit, to house facts about the "Mother" slot.}
␈↓ ↓H␈βα↑␈¬What should the Isa link for this Mother link be?
␈↓ α_␈βα|␈¬{It will be created as a new Primitive slot - hence the "P" response above.}
␈↓ ↓H␈ββ8␈¬Expecting one of:
␈↓ ↓H␈ββV␈¬(P V A *)
␈↓ ↓H␈β∧∩␈¬What should the Isa link for this Mother link be? P
␈↓ ↓H␈β∧0␈¬Please enter the Knowledge Base in which to store Mother: GENLINFO
␈↓ ↓H␈β∧N␈¬ * Initialized Mother *
␈↓ ↓H␈β∧l␈¬edit
␈↓ ↓H␈β¬
␈¬8*pp
␈↓ ↓H␈β¬(␈¬(Isa (PrimSlot)
␈↓ ↓H␈β¬F␈¬ AllIsas (AnySlot AnyUnitListFn AnyFunction AnyCT&U Anything AnyProcess
␈↓ α_␈β¬d␈¬ AnyStorableFn AnyUnitFunction PrimSlot)
␈↓ ↓H␈βεα␈¬ Prototypes (TypicalPrimSlot TypicalSlot TypicalUnitFn TypicalStorableFn
␈↓ α_␈βε ␈¬ TypicalFunction TypicalProcess TypicalCT&U TypicalThing)
␈↓ ↓H␈βε>␈¬ MySlotsNowOrdered (OrderedPrototypes)
␈↓ ↓H␈βε\␈¬ MyCreatedAs (IExamples (PrimSlot))
␈↓ ↓H␈βεz␈¬ MyTimeOfCreation "18-Aug-80 14:10:56"
␈↓ ↓H␈βπ_␈¬ MyCreator "NewUser"
␈↓ ↓H␈βπ6␈¬ Format (*Do* FOneOf FSingleton FSet FList FOrderedSet FBag)
␈↓ α_␈βπT␈¬{We'll see soon this special value, ↑, will be useful.}
␈↓ ↓H␈βπr␈¬ Datatype (NonNILType)
␈↓ ↓H␈βλ⊂␈¬ MySensibleSlots (Descr Characteristics Prototypes AllSpecs AllGenls AllIsas Isa
␈↓ αh␈βλ.␈¬ OrderedPrototypes Specializations MySlots MyCreatedAs
␈↓ αh␈βλL␈¬ MySensibleSlots MySlotsNowOrdered MyEssentialVirtualSlots
␈↓ αh␈βλj␈¬ MyToRenameMe MyToKillMe MyTimeOfCreation MyCreator WhatToProcess
␈↓ αh␈β λ␈¬ HowToProcess LispFn IUseDefnOf IUseCVOf DefnUsedBy CVUsedBy
␈↓ αh␈β &␈¬ FunctionCharacter RangeType DomainType PreConditions Range Domain
␈↓ αh␈β D␈¬ Definition FunctionSpec Format Datatype DataRange Defn
␈↓ αh␈β b␈¬ HighLevelDefn IsBuiltFrom UsingFunctions SlotsBuiltFrom
␈↓ αh␈β
␈¬ UsingFunctionals UnitsBuiltFrom SlotsUsedInBuilding ToLookUp
␈↓ αh␈β
≡␈¬ ToCache LispFnForStoredFn StoredAList ToConfirmValue
␈↓ αh␈β
<␈¬ UsingSlotCombiners ToGetValue HandDoneSBF AllSBF VerifyElement
␈↓ αh␈β
Z␈¬ VerifyAll ToSubstValue ToDeleteValue ToAddValue MakesSenseFor
␈↓ αh␈β
x␈¬ SubSlot* SuperSlot* SubSlot SuperSlot ToInitialize ToPutValue
␈↓ αh␈β⊗␈¬ OrderForToInit KBUpdates Inverse IsEssentialFor))
␈↓ ↓H␈β4␈¬8*f Datatype
␈↓ ↓H␈βR␈¬9*p
␈↓ ↓H␈βp␈¬... Datatype (NonNILType) ...
␈↓ ↓H␈β∞␈¬9*(2 (UnitType) DataRange (*P AnyPerson]
␈↓ α_␈β,␈¬{This "UnitType" indicates the value of U:Mother will be a unit;
␈↓ α_␈βJ␈¬ and the DataRange restricts that, to say that unit will descend
␈↓ α_␈βh␈¬ from AnyPerson}
␈↓ ↓H␈β
ε␈¬10*↑ f Format
␈↓ ↓H␈β
$␈¬12*2 p
␈↓ ↓H␈β
B␈¬(*Do* FOneOf FSingleton FSet FList FOrderedSet FBag)
␈↓ α_␈β
`␈¬{IE The format must be one of these.
␈↓ α_␈β
}␈¬ We'll see soon that each of these formats is really a unit.}
␈↓ ↓H␈β∞≤␈¬13*xtr 3
␈↓ α_␈β∞:␈¬{This means U:Mother will be filled with a single entry.
␈↓ α_␈β∞X␈¬ That's all I want to say about Mothers, at this time.}
␈↓ ↓H␈β∞v␈¬14*ok
␈↓ ↓H␈β∂∀␈¬Verifying slots
␈↓ α_␈β∂2␈¬{We now pop back to editing TypicalPerson, and find another non-slot:}
␈↓ ∞␈β↓↓␈¬G-9
␈↓ ↓H␈β↓H␈¬Your attempted slot name Husband is NOT even a unit. Should it be? yes
␈↓ ↓H␈β↓f␈¬What should the Isa link for this Husband link be? P
␈↓ ↓H␈βα∧␈¬Please enter the Knowledge Base in which to store Husband: GENLINFO
␈↓ ↓H␈βα"␈¬ * Initialized Husband *
␈↓ ↓H␈βα@␈¬edit
␈↓ α_␈βα↑␈¬{To fix Husband's range specification:}
␈↓ ↓H␈βα|␈¬15*f Datatype
␈↓ ↓H␈ββ~␈¬16*2 p
␈↓ ↓H␈ββ8␈¬(NonNILType)
␈↓ ↓H␈ββV␈¬17*: (UnitType) DataRange (*P AnyPerson]
␈↓ ↓H␈ββt␈¬18*ok
␈↓ ↓H␈β∧∩␈¬Verifying slots
␈↓ ↓H␈β∧0␈¬What should the value of Husband:Format be?
␈↓ ↓H␈β¬
␈¬Expecting one of:
␈↓ ↓H␈β¬(␈¬(FSingleton FSet FList FOrderedSet FBag)
␈↓ ↓H␈β¬d␈¬What should the value of Husband:Format be? FSingleton
␈↓ ↓H␈βεα␈¬TypicalPerson
␈↓ α_␈βε ␈¬{Note it asked for Husband's format, as I hadn't specified it; and RLL
␈↓ α_␈βε>␈¬ figured it would be needed eventually.}
␈↓ β ␈βεz␈¬↓<<<< 7. Examining unit which represent Formats >>>>
␈↓ α_␈βπ_␈¬{Note first that there are two subclasses of formats:}
␈↓ ↓H␈βπ6␈¬30←SubClass(AnyFormat]
␈↓ ↓H␈βπT␈¬(AnySlotFormat AnyValueFormat)
␈↓ α_␈βλ⊂␈¬{The interesting one is}
␈↓ ↓H␈βλ.␈¬31←Examples(AnySlotFormat]
␈↓ ↓H␈βλL␈¬(FSingleton FList FSet FOrderedSet FBag FListN)
␈↓ α_␈β λ␈¬{Each of these is a bonafide unit:}
␈↓ ↓H␈β &␈¬32←EDITU(FSet]
␈↓ ↓H␈β D␈¬edit
␈↓ ↓H␈β b␈¬66*p
␈↓ ↓H␈β
␈¬(Isa (AnySlotFormat)
␈↓ ↓H␈β
≡␈¬ FnForVerifyingAll (LAMBDA & &)
␈↓ ↓H␈β
<␈¬ FnForVerifyingElement (LAMBDA & &)
␈↓ ↓H␈β
Z␈¬ FormatCharacter (MayBeEmpty NonOrdered NoDuplicated ArbitraryNumberOfEntries)
␈↓ ↓H␈β
x␈¬ FnForAdding (LAMBDA & &)
␈↓ ↓H␈β⊗␈¬ FnForDeleting (LAMBDA & & &)
␈↓ ↓H␈β4␈¬ FnForSubstituting (LAMBDA & & &)
␈↓ ↓H␈βR␈¬ FnForPutting (LAMBDA & &) --)
␈↓ α_␈βp␈¬{The value for each of the FnFor--- is a function, which is used by some
␈↓ α_␈β∞␈¬ accessing function (eg GetValue) to view or alter a value.}
␈↓ ↓H␈βJ␈¬66*ok
␈↓ ↓H␈βh␈¬Nothing changed.
␈↓ ↓H␈β
ε␈¬FSet
␈↓ ↓H␈β
B␈¬36←(MAPCAR (Examples 'AnySlotFormat) 'FormatCharacter]
␈↓ ↓H␈β
}␈¬((MayBeEmpty SingleEntry)
␈↓ ↓H␈β∞≤␈¬ (MayBeEmpty Ordered Duplicates ArbitraryNumberOfEntries)
␈↓ ↓H␈β∞:␈¬ (MayBeEmpty NonOrdered NoDuplicated ArbitraryNumberOfEntries)
␈↓ ↓H␈β∞X␈¬ (MayBeEmpty Ordered NoDuplicated ArbitraryNumberOfEntries)
␈↓ ↓H␈β∞v␈¬ (MayBeEmpty NonOrdered Duplicates ArbitraryNumberOfEntries)
␈↓ ↓H␈β∂∀␈¬ (MayBeEmpty Ordered Duplicates ExactNumberOfEntries))
␈↓ ↓⊗␈β↓↓␈¬G-10
␈↓ ∧∪␈β↓H␈¬↓<<<< 8. Adding on a new person >>>>
␈↓ α_␈βα∧␈¬{Back to our main plot:
␈↓ α_␈βα"␈¬ Let's make Visitor think of itself as a person.}
␈↓ ↓H␈βα@␈¬6←EDITU(Visitor]
␈↓ ↓H␈βα↑␈¬edit
␈↓ ↓H␈βα|␈¬19*p
␈↓ ↓H␈ββ~␈¬(Isa (AnyUser) UserNames ("NewUser") ... )
␈↓ ↓H␈ββV␈¬19*2 (n AnyPerson]
␈↓ ↓H␈β∧∩␈¬21*0 p
␈↓ ↓H␈β∧N␈¬(Isa (AnyUser AnyPerson) UserNames ("NewUser") ... )
␈↓ ↓H␈β¬
␈¬22*ok
␈↓ ↓H␈β¬(␈¬Verifying slots
␈↓ ↓H␈β¬F␈¬Visitor
␈↓ α_␈βεα␈¬{Note I could have made AnyUser a subclass of AnyPerson,
␈↓ α_␈βε ␈¬ but who knows who (or what) will eventually be using RLL...}
␈↓ ↓H␈βε>␈¬7←EDITU]
␈↓ ↓H␈βε\␈¬=Visitor
␈↓ ↓H␈βεz␈¬edit
␈↓ α_␈βπ_␈¬{Let's give our visitor a mother:}
␈↓ ↓H␈βπT␈¬23*(n Mother HisMother]
␈↓ α_␈βπr␈¬{(Note this should NOT work, as we have yet to define "HisMother"...)}
␈↓ ↓H␈βλ⊂␈¬28*ok
␈↓ ↓H␈βλ.␈¬Verifying slots
␈↓ ↓H␈βλj␈¬Trouble doing actual Put (Visitor Mother HisMother)
␈↓ ↓H␈β λ␈¬Shall I go on, break, or edit this value? Go
␈↓ ↓H␈β D␈¬Visitor
␈↓ βM␈β
␈¬↓<<<< 9. Creating a new entity - HisMother >>>>
␈↓ α_␈β
≡␈¬{So let's create that unit.}
␈↓ ↓H␈β
<␈¬8←NewIsa)
␈↓ ↓H␈β
Z␈¬Name: HisMother
␈↓ ↓H␈β
x␈¬Is a IExamples of: AnyPerson
␈↓ ↓H␈β⊗␈¬Please enter the Knowledge Base in which to store HisMother: GENLINFO
␈↓ ↓H␈β4␈¬ * Initialized HisMother *
␈↓ ↓H␈βR␈¬edit
␈↓ ↓H␈βp␈¬29*pp
␈↓ ↓H␈β,␈¬(Isa (AnyPerson)
␈↓ ↓H␈βJ␈¬ AllIsas (AnyCT&U Anything AnyPerson)
␈↓ ↓H␈βh␈¬ Prototypes (TypicalPerson TypicalCT&U TypicalThing)
␈↓ ↓H␈β
ε␈¬ MySlotsNowOrdered (OrderedPrototypes)
␈↓ ↓H␈β
$␈¬ MyCreatedAs (IExamples (AnyPerson))
␈↓ ↓H␈β
B␈¬ MyTimeOfCreation "18-Aug-80 14:27:04"
␈↓ ↓H␈β
`␈¬ MyCreator "NewUser"
␈↓ ↓H␈β
}␈¬ MySensibleSlots (Descr Characteristics Prototypes AllSpecs AllGenls AllIsas Isa
␈↓ ↓H␈β∞≤␈¬ OrderedPrototypes Specializations MySlots MyCreatedAs
␈↓ ↓H␈β∞:␈¬ MySensibleSlots MySlotsNowOrdered MyEssentialVirtualSlots
␈↓ ↓H␈β∞X␈¬ MyToRenameMe MyToKillMe MyTimeOfCreation MyCreator Husband Mother))
␈↓ ↓H␈β∂∀␈¬29*ok
␈↓ ↓H␈β∂2␈¬Verifying slots
␈↓ ∞␈β↓↓␈¬G-11
␈↓ ↓H␈β↓H␈¬HisMother
␈↓ βp␈βα∧␈¬↓<<<< 10. How are new units created? >>>>
␈↓ ↓H␈βα@␈¬37←PP(NewIsa]
␈↓ ↓H␈βα↑␈¬loading from <CSD.RLL>UTIL..7
␈↓ ↓H␈ββ~␈¬(NewIsa
␈↓ ↓H␈ββ8␈¬ [LAMBDA (Son Parent whichKB) **COMMENT** **COMMENT**
␈↓ ↓H␈ββV␈¬ (NewUnit Son Parent (QUOTE IExamples) whichKB T])
␈↓ ↓H␈ββt␈¬(NewIsa)
␈↓ α_␈β∧0␈¬{So what is "IExamples}
␈↓ ↓H␈β∧l␈¬38←EDITU(IExamples]
␈↓ ↓H␈β¬
␈¬edit
␈↓ ↓H␈β¬(␈¬69*p
␈↓ ↓H␈β¬F␈¬(Isa (AnyInheritance)
␈↓ ↓H␈β¬d␈¬ Descr (Here is a the inheritance fo creating something which is an examples
␈↓ α_␈βεα␈¬of some class.)
␈↓ ↓H␈βε ␈¬ UseToGetSlots GenlsModels
␈↓ ↓H␈βε>␈¬ GetPossibleSlotsFn PossibleSlotsOfIExamples)
␈↓ α_␈βεz␈¬{There may eventually be other things stored here, once we figure out
␈↓ α_␈βπ_␈¬ what we mean when we say "Inheritance".}
␈↓ ↓H␈βπ6␈¬69*ok
␈↓ ↓H␈βπT␈¬Nothing changed.
␈↓ ↓H␈βπr␈¬IExamples
␈↓ α_␈βλ.␈¬{Are there other inheritances?}
␈↓ ↓H␈βλL␈¬39←AllExamples(AnyInheritance]
␈↓ ↓H␈βλj␈¬(ITypEx ISubClass IExamples)
␈↓ α_␈β &␈¬{What is that PossibleSlotsOfIExamples?}
␈↓ ↓H␈β D␈¬39←EDITU(PossibleSlotsOfIExamples]
␈↓ ↓H␈β b␈¬edit
␈↓ ↓H␈β
␈¬70*p
␈↓ ↓H␈β
≡␈¬(UsedByInheritance IExamples
␈↓ ↓H␈β
<␈¬ Isa (AnySlotGetter)
␈↓ ↓H␈β
Z␈¬ Format FOrderedSet
␈↓ ↓H␈β
x␈¬ HighLevelDefn (PutInOrder (CommonXProd NewPossibleSlots
␈↓ ∧X␈β⊗␈¬(ApplyToEach MapUnion GenlsModels)
␈↓ ∧X␈β4␈¬WhereInitFn)
␈↓ β8␈βR␈¬ OrderForToInit CAR NIL)
␈↓ ↓H␈βp␈¬ ... )
␈↓ α_␈β∞␈¬{Wow - look at that HighLevelDefn!}
␈↓ ↓H␈β,␈¬72*ok
␈↓ ↓H␈βJ␈¬Nothing changed.
␈↓ ↓H␈βh␈¬PossibleSlotsOfIExamples
␈↓ ∧␈β
$␈¬↓<<<< 11. Hack to LISP's evaluator >>>>
␈↓ α_␈β
B␈¬{To see our collection of people:}
␈↓ ↓H␈β
`␈¬9←Examples(AnyPerson]
␈↓ ↓H␈β
}␈¬(HisMother Visitor)
␈↓ α_␈β∞:␈¬{ 1)␈↓ αhThat is, as U:Isa was filled with AnyPerson,
␈↓ αh␈β∞X␈¬U was added to AnyPerson:Examples
␈↓ α_␈β∞v␈¬ 2) Note there is no function named "Examples".
␈↓ αh␈β∂∀␈¬That call worked because we've hacked up LISP's evaluator to try
␈↓ αh␈β∂2␈¬(GetValue U 'S) if S(U) fails}
␈↓ ↓⊗␈β↓↓␈¬G-12
␈↓ ↓H␈β↓f␈¬10←GETD(Examples]
␈↓ ↓H␈βα∧␈¬NIL
␈↓ α_␈βα@␈¬{It is, of course, a unit:}
␈↓ ↓H␈βα↑␈¬11←Unitp(Examples]
␈↓ ↓H␈βα|␈¬RLL
␈↓ α_␈ββ~␈¬{The same is true for AllExamples, shown last page.}
␈↓ β(␈ββV␈¬↓<<<< 12. Creating a new datatype - GenderType >>>>
␈↓ α_␈β∧∩␈¬{Lets now create a new datatype, to help us distinguish
␈↓ α_␈β∧0␈¬Males from Females
␈↓ α_␈β∧N␈¬First, what are the current datatypes?}
␈↓ ↓H␈β∧l␈¬11←Examples(AnyDatatype]
␈↓ ↓H␈β¬
␈¬(KBType TVType NonNILType GrammarType NumberType BooleanType UnrestrictedType
␈↓ ↓H␈β¬(␈¬ FunctionType SlotType IntegerType UnitType StringType)
␈↓ α_␈β¬d␈¬{We'll create a copy of BooleanType, then modify that copy,
␈↓ α_␈βεα␈¬ using the function}
␈↓ ↓H␈βε ␈¬12←NU(GenderType)
␈↓ ↓H␈βε>␈¬Copy from: BooleanType
␈↓ ↓H␈βε\␈¬Please enter the Knowledge Base in which to store GenderType: GENLINFO
␈↓ ↓H␈βεz␈¬edit
␈↓ ↓H␈βπ6␈¬30*pp
␈↓ ↓H␈βπT␈¬(Isa (AnyDatatype)
␈↓ ↓H␈βπr␈¬ VerifyType [LAMBDA (x)
␈↓ ↓H␈βλ⊂␈¬ (FMEMB x (QUOTE (T F]
␈↓ ↓H␈βλ.␈¬ GenerateAll [LAMBDA NIL (QUOTE (T F]
␈↓ ↓H␈βλL␈¬ IsTypeOf NoEntries
␈↓ ↓H␈βλj␈¬ SuperDT (NonNILType)
␈↓ ↓H␈β λ␈¬ MyCreatedAs (IExamples (AnyDatatype)))
␈↓ α_␈β &␈¬{Apparently the function stored in VerifyType returns nonNIL
␈↓ α_␈β D␈¬ if its argument qualifies as a member of this datatype.
␈↓ α_␈β b␈¬ (We could have found this out by looking on the "VerifyType" unit...)
␈↓ α_␈β
␈¬ and GenerateAll returns a list of these acceptable values.}
␈↓ ↓H␈β
≡␈¬30*(R (T F) (Male Female Neuter Hermaphroditic]
␈↓ ↓H␈β
Z␈¬34*PP
␈↓ ↓H␈β
x␈¬(Isa (AnyDatatype)
␈↓ ↓H␈β⊗␈¬ VerifyType [LAMBDA (x)
␈↓ ↓H␈β4␈¬ (FMEMB x (QUOTE (Male Female Neuter Hermaphroditic]
␈↓ ↓H␈βR␈¬ GenerateAll [LAMBDA NIL (QUOTE (Male Female Neuter Hermaphroditic]
␈↓ ↓H␈βp␈¬ IsTypeOf NoEntries
␈↓ ↓H␈β∞␈¬ ...
␈↓ α_␈β,␈¬{Everything else looks right. so}
␈↓ ↓H␈βJ␈¬42*ok
␈↓ ↓H␈βh␈¬Verifying slots
␈↓ ↓H␈β
ε␈¬GenderType
␈↓ α_␈β
B␈¬{Note another way of doing this would be to create a new class, AnyGender
␈↓ α_␈β
`␈¬ and have a unit for each of these - Male, Female, ...
␈↓ α_␈β
}␈¬ This was how Formats, Datatypes, Inheritances, ...
␈↓ α_␈β∞≤␈¬ were all handled.
␈↓ α_␈β∞:␈¬Let's now have genders, all around}
␈↓ ∧
␈β∞v␈¬↓<<<< 13. Engendering our visitor >>>>
␈↓ ↓H␈β∂2␈¬13←EDITU(Visitor]
␈↓ ∞␈β↓↓␈¬G-13
␈↓ ↓H␈β↓H␈¬edit
␈↓ ↓H␈β↓f␈¬43*(-1 Gender Male]
␈↓ α_␈βα"␈¬{Showing my prejudices, I'll assume this visitor is masculine.
␈↓ α_␈βα@␈¬ Note there is now no unit named Gender. RLL will notice that also.}
␈↓ ↓H␈βα↑␈¬44*p
␈↓ ↓H␈βα|␈¬(Gender Male Isa (AnyUser AnyPerson) UserNames ("NewUser") ... )
␈↓ ↓H␈ββ8␈¬44*ok
␈↓ ↓H␈ββV␈¬Verifying slots
␈↓ ↓H␈β∧∩␈¬Your attempted slot name Gender is NOT even a unit. Should it be? yes
␈↓ ↓H␈β∧0␈¬What should the Isa link for this Gender link be? P
␈↓ ↓H␈β∧N␈¬Please enter the Knowledge Base in which to store Gender: GENLINFO
␈↓ ↓H␈β¬
␈¬ * Initialized Gender *
␈↓ ↓H␈β¬F␈¬edit
␈↓ ↓H␈β¬d␈¬45*p
␈↓ ↓H␈βεα␈¬(Isa (PrimSlot) AllIsas (AnySlot AnyUnitListFn AnyFunction AnyCT&U Anything
␈↓ ↓H␈βε ␈¬AnyProcess AnyStorableFn AnyUnitFunction PrimSlot) Prototypes (TypicalPrimSlot
␈↓ ↓H␈βε>␈¬TypicalSlot TypicalUnitFn TypicalStorableFn TypicalFunction TypicalProcess
␈↓ ↓H␈βε\␈¬TypicalCT&U TypicalThing) MySlotsNowOrdered (OrderedPrototypes) MyCreatedAs (
␈↓ ↓H␈βεz␈¬IExamples &) MyTimeOfCreation "18-Aug-80 14:43:27" MyCreator "NewUser" Format (
␈↓ ↓H␈βπ_␈¬*Do* FOneOf FSingleton FSet FList FOrderedSet FBag) Datatype (NonNILType)
␈↓ ↓H␈βπ6␈¬--)
␈↓ α_␈βπr␈¬{Lets fix up the value of Datatype, using our newly created one:}
␈↓ ↓H␈βλ⊂␈¬45*15 up p
␈↓ ↓H␈βλ.␈¬... Datatype (NonNILType) MySensibleSlots (Descr Characteristics ... ))
␈↓ ↓H␈βλj␈¬47*(2 (GenderType]
␈↓ α_␈β &␈¬{I'll also indicate that only people can have genders, using the
␈↓ α_␈β D␈¬MakesSenseFor slot:}
␈↓ ↓H␈β b␈¬49*(n MakesSenseFor (TypicalPerson]
␈↓ ↓H␈β
␈¬50*ok
␈↓ ↓H␈β
≡␈¬Verifying slots
␈↓ ↓H␈β
Z␈¬What should the value of Gender:Format be? FSingleton
␈↓ ↓H␈β
x␈¬Visitor
␈↓ α_␈β4␈¬{As Inverse(MakesSenseFor) is NewPossibleSlots,
␈↓ α_␈βR␈¬ Let's now look at the NewPossibleSlots of TypicalPerson}
␈↓ ↓H␈β∞␈¬46←NewPossibleSlots(TypicalPerson]
␈↓ ↓H␈β,␈¬(Gender Mother Husband)
␈↓ βA␈βh␈¬↓<<<< 14. Indicating that Mothers are female >>>>
␈↓ α_␈β
$␈¬{Let's now specify that all Mothers are female:
␈↓ α_␈β
B␈¬ First, how to say that range specification,
␈↓ α_␈β
`␈¬ look at the UnitType datatype.}
␈↓ ↓H␈β
}␈¬47←EDITU(UnitType]
␈↓ ↓H␈β∞≤␈¬edit
␈↓ ↓H␈β∞:␈¬93*p
␈↓ ↓H␈β∞v␈¬(Isa (AnyDatatype)
␈↓ ↓H␈β∂∀␈¬ VerifyType Unitp
␈↓ ↓H␈β∂2␈¬ IsTypeOf (Husband KBsConnectedTo Isa NewPossibleSlots ...)
␈↓ ↓⊗␈β↓↓␈¬G-14
␈↓ ↓H␈β↓H␈¬ RangeInterpreter UnitRange
␈↓ ↓H␈β↓f␈¬ SuperDT (NonNILType)
␈↓ ↓H␈βα∧␈¬ SubDT (SlotType)
␈↓ ↓H␈βα"␈¬ MyCreatedAs (IExamples &)
␈↓ ↓H␈βα@␈¬ AllIsas (AnyCT&U Anything AnyDatatype))
␈↓ ↓H␈βα|␈¬93*f RangeInterpreter
␈↓ ↓H␈ββ~␈¬94*p
␈↓ ↓H␈ββV␈¬... RangeInterpreter UnitRange ...
␈↓ α_␈β∧∩␈¬{The value of DT:RangeInterpreter is a function, which uses a slot's
␈↓ α_␈β∧0␈¬ DataRange value to compose a function. That function is used to
␈↓ α_␈β∧N␈¬ restrict the values acceptable for that slot.}
␈↓ ↓H␈β∧l␈¬94*2 p
␈↓ ↓H␈β¬
␈¬UnitRange
␈↓ α_␈β¬F␈¬{Lets look at this functions}
␈↓ ↓H␈β¬d␈¬95*ef
␈↓ ↓H␈βεα␈¬loading from <CSD.RLL>RLL..6
␈↓ ↓H␈βε ␈¬prop
␈↓ ↓H␈βε>␈¬edit
␈↓ ↓H␈βε\␈¬95*p
␈↓ ↓H␈βπ_␈¬(LAMBDA (rangespec valname) **COMMENT** (AND & &))
␈↓ α_␈βπT␈¬{Details omitted for brevity.}
␈↓ ↓H␈βπr␈¬95*ok
␈↓ ↓H␈βλ⊂␈¬not changed, so not unsaved
␈↓ ↓H␈βλ.␈¬UnitRange
␈↓ ↓H␈βλj␈¬96*ok
␈↓ ↓H␈β λ␈¬Nothing changed.
␈↓ ↓H␈β &␈¬UnitType
␈↓ α_␈β b␈¬{What is the current range type of Mother?}
␈↓ ↓H␈β
␈¬48←RangeType(Mother]
␈↓ ↓H␈β
≡␈¬[FSingleton (UnitType (*P AnyPerson)]
␈↓ α_␈β
Z␈¬{That is, the value of U:Mother is a single value, which is a unit,
␈↓ α_␈β
x␈¬ which descends from AnyPerson.
␈↓ α_␈β⊗␈¬ Now to add that specification to Mother:}
␈↓ ↓H␈βR␈¬49←EDITU(Mother]
␈↓ ↓H␈βp␈¬edit
␈↓ ↓H␈β,␈¬97*f DataRange
␈↓ ↓H␈βJ␈¬98*2 p
␈↓ ↓H␈βh␈¬(*P AnyPerson)
␈↓ ↓H␈β
ε␈¬99*mbd (L-AND * (SlotVal Gender Female]
␈↓ ↓H␈β
$␈¬100*p
␈↓ ↓H␈β
B␈¬(L-AND (*P AnyPerson) (SlotVal Gender Female))
␈↓ α_␈β
}␈¬{By the way, there is a unit for this L-AND}
␈↓ ↓H␈β∞≤␈¬100*EU
␈↓ ↓H␈β∞:␈¬edit
␈↓ ↓H␈β∞v␈¬100*p
␈↓ ↓H␈β∂2␈¬(Isa (AnyLogicalOp)
␈↓ ∞␈β↓↓␈¬G-15
␈↓ ↓H␈β↓H␈¬ MyCreator "CSD.GREINER"
␈↓ ↓H␈β↓f␈¬ MyTimeOfCreation "15-Apr-80 17:43:55"
␈↓ ↓H␈βα∧␈¬ MyCreatedAs (IExamples &)
␈↓ ↓H␈βα"␈¬ Defn (LAMBDA & &))
␈↓ ↓H␈βα↑␈¬100*ok
␈↓ ↓H␈βα|␈¬Nothing changed.
␈↓ ↓H␈ββ~␈¬L-AND
␈↓ ↓H␈ββV␈¬1*ok
␈↓ ↓H␈ββt␈¬Verifying slots
␈↓ ↓H␈β∧∩␈¬Mother
␈↓ α_␈β∧N␈¬{Now to show that Mother's RangeType has changed:}
␈↓ ↓H␈β∧l␈¬51←RangeType(Mother]
␈↓ ↓H␈β¬(␈¬[FSingleton (UnitType (L-AND (*P AnyPerson)
␈↓ ↓H␈β¬F␈¬ (SlotVal Gender Female]
␈↓ ∧+␈βεα␈¬↓<<<< 15. Add another person >>>>
␈↓ α_␈βε>␈¬{Add another person to our KB}
␈↓ ↓H␈βεz␈¬52←NewIsa(Fred AnyPerson GENLINFO]
␈↓ ↓H␈βπ_␈¬ * Initialized Fred *
␈↓ ↓H␈βπ6␈¬edit
␈↓ ↓H␈βπr␈¬2*p
␈↓ ↓H␈βλ.␈¬(Isa (AnyPerson) AllIsas (AnyCT&U Anything AnyPerson) Prototypes (TypicalPerson
␈↓ ↓H␈βλL␈¬TypicalCT&U TypicalThing) MySlotsNowOrdered (OrderedPrototypes) MyCreatedAs (
␈↓ ↓H␈βλj␈¬IExamples &) MyTimeOfCreation "18-Aug-80 15:03:25" MyCreator "NewUser"
␈↓ ↓H␈β λ␈¬MySensibleSlots (Descr Characteristics Prototypes AllSpecs AllGenls AllIsas Isa
␈↓ ↓H␈β &␈¬OrderedPrototypes Specializations MySlots MyCreatedAs MySensibleSlots
␈↓ ↓H␈β D␈¬MySlotsNowOrdered MyEssentialVirtualSlots MyToRenameMe MyToKillMe
␈↓ ↓H␈β b␈¬MyTimeOfCreation MyCreator Husband --))
␈↓ α_␈β
≡␈¬{Lets engender Fred}
␈↓ ↓H␈β
<␈¬2*(n Gender Male]
␈↓ ↓H␈β
Z␈¬ok
␈↓ ↓H␈β
x␈¬Verifying slots
␈↓ ↓H␈β⊗␈¬Fred
␈↓ α_␈βR␈¬{As a side comment, creating Fred took much less time than creating
␈↓ α_␈βp␈¬ HisMother, as much of the information needed to create a new example
␈↓ α_␈β∞␈¬ AnyPerson was cached away during this first computation.
␈↓ α_␈β,␈¬This was true in general - the first time a new unit is created using
␈↓ α_␈βJ␈¬ inheritance I, from the list of parents, P, it will take a long time.
␈↓ α_␈βh␈¬ Subsequent children of these parents will created and initialized much
␈↓ α_␈β
ε␈¬ faster.}
␈↓ ∧ ␈β
B␈¬↓<<<< 16. Can a male be a mother? >>>>
␈↓ α_␈β
}␈¬{Lets see if we're allowed to make Fred a mother:
␈↓ α_␈β∞≤␈¬ (Note PutValue returns NIL only if some error had been encountered.]}
␈↓ ↓H␈β∞:␈¬53←PutValue(Fred Mother Visitor]
␈↓ ↓H␈β∞X␈¬NIL
␈↓ α_␈β∂∀␈¬{That is, no value was put -- i.e.}
␈↓ ↓⊗␈β↓↓␈¬G-16
␈↓ ↓H␈β↓H␈¬68←UA-GETVALUE(Fred Mother]
␈↓ ↓H␈β↓f␈¬NIL
␈↓ α_␈βα"␈¬{[Note UA-GETVALUE is like GETPROP - no smarts]
␈↓ α_␈βα@␈¬ We now show PutValue can do something:
␈↓ α_␈βα↑␈¬ First, let's make HisMother Female:}
␈↓ ↓H␈βα|␈¬69←PutValue(HisMother Gender Female]
␈↓ ↓H␈ββ~␈¬Female
␈↓ ↓H␈ββV␈¬70←PutValue(Fred Mother HisMother]
␈↓ ↓H␈ββt␈¬HisMother
␈↓ α_␈β∧0␈¬{Proof:}
␈↓ ↓H␈β∧N␈¬71←UA-GETVALUE(Fred Mother]
␈↓ ↓H␈β∧l␈¬HisMother
␈↓ βz␈β¬F␈¬↓<<<< 17. Now make Husbands male: >>>>
␈↓ ↓H␈βεα␈¬73←EDITU(Husband]
␈↓ ↓H␈βε ␈¬edit
␈↓ ↓H␈βε\␈¬19*f DataRange
␈↓ ↓H␈βπ_␈¬20*p
␈↓ ↓H␈βπT␈¬... DataRange (*P AnyPerson) ...
␈↓ ↓H␈βλ⊂␈¬20*2 MBD (L-AND * (SlotVal Gender Male]
␈↓ ↓H␈βλL␈¬21*1 p
␈↓ ↓H␈β λ␈¬... (L-AND (*P AnyPerson) (SlotVal Gender Male)) ...
␈↓ ↓H␈β D␈¬22*ok
␈↓ ↓H␈β
␈¬Verifying slots
␈↓ ↓H␈β
≡␈¬Husband
␈↓ α_␈β
Z␈¬{Just to check}
␈↓ ↓H␈β⊗␈¬75←RangeType(Husband]
␈↓ ↓H␈β4␈¬[FSingleton (UnitType (L-AND (*P AnyPerson)
␈↓ ↓H␈βR␈¬ (SlotVal Gender Male]
␈↓ βf␈β,␈¬↓<<<< 18. To give HisMother a Husband >>>>
␈↓ ↓H␈βh␈¬76←NewIsa)
␈↓ ↓H␈β
ε␈¬Name: HerHusband
␈↓ ↓H␈β
$␈¬Is a IExamples of: AnyPerson
␈↓ ↓H␈β
B␈¬Please enter the Knowledge Base in which to store HerHusband: GENLINFO
␈↓ ↓H␈β
`␈¬ * Initialized HerHusband *
␈↓ ↓H␈β∞≤␈¬edit
␈↓ ↓H␈β∞:␈¬23*pp
␈↓ ↓H␈β∞X␈¬(Isa (AnyPerson)
␈↓ ↓H␈β∞v␈¬ AllIsas (AnyCT&U Anything AnyPerson)
␈↓ ↓H␈β∂∀␈¬ Prototypes (TypicalPerson TypicalCT&U TypicalThing)
␈↓ ↓H␈β∂2␈¬ MySlotsNowOrdered (OrderedPrototypes)
␈↓ ∞␈β↓↓␈¬G-17
␈↓ ↓H␈β↓H␈¬ MyCreatedAs (IExamples (AnyPerson))
␈↓ ↓H␈β↓f␈¬ MyTimeOfCreation "18-Aug-80 15:15:50"
␈↓ ↓H␈βα∧␈¬ MyCreator "NewUser"
␈↓ ↓H␈βα"␈¬ MySensibleSlots (Descr Characteristics Prototypes AllSpecs AllGenls AllIsas Isa
␈↓ αh␈βα@␈¬ OrderedPrototypes Specializations MySlots MyCreatedAs
␈↓ αh␈βα↑␈¬ MySensibleSlots MySlotsNowOrdered MyEssentialVirtualSlots
␈↓ αh␈βα|␈¬ MyToRenameMe MyToKillMe MyTimeOfCreation MyCreator Husband Mother
␈↓ αh␈ββ~␈¬ Gender))
␈↓ α_␈ββV␈¬{Note Gender is on MySensibleSlots now
␈↓ α_␈ββt␈¬ (of course it wasn't before it existed.]}
␈↓ ↓H␈β∧0␈¬23*(n Gender Male]
␈↓ ↓H␈β∧N␈¬24*ok
␈↓ ↓H␈β¬
␈¬Verifying slots
␈↓ ↓H␈β¬(␈¬HerHusband
␈↓ ↓H␈β¬d␈¬77←PutValue(HisMother Husband HerHusband]
␈↓ ↓H␈βεα␈¬HerHusband
␈↓ α_␈βε ␈¬{Now HisMother:Husband is HerHusband, as planned.}
␈↓ βG␈βε\␈¬↓<<<< 19. Create a new type of slot - Father >>>>
␈↓ ↓H␈βπ_␈¬78←SMARTARGLIST(CreateSlot]
␈↓ ↓H␈βπ6␈¬(hld kb extra-pairs name)
␈↓ α_␈βπr␈¬{To define Father}
␈↓ ↓H␈βλ⊂␈¬78←(CreateSlot '(Composition Husband Mother) 'GENLINFO NIL 'Father]
␈↓ ↓H␈βλ.␈¬Father
␈↓ α_␈βλj␈¬{To see if it worked:}
␈↓ ↓H␈β λ␈¬79←Father(Fred]
␈↓ ↓H␈β &␈¬HerHusband
␈↓ α_␈β b␈¬{Lets see what this unit really looks like}
␈↓ ↓H␈β
≡␈¬88←EDITU(Father]
␈↓ ↓H␈β
<␈¬edit
␈↓ ↓H␈β
Z␈¬36*F Defn
␈↓ ↓H␈β
x␈¬37*2 pp
␈↓ ↓H␈β4␈¬[LAMBDA (uNITcomp sLOTcomp oTHERcomp)
␈↓ ↓H␈βR␈¬ (OR (GetValue (GetValue uNITcomp (QUOTE Mother)
␈↓ ↓H␈βp␈¬ (AddOnCharacter oTHERcomp (QUOTE VERYSAFESLOT)))
␈↓ ↓H␈β∞␈¬ (QUOTE Husband)
␈↓ ↓H␈β,␈¬ (AddOnCharacter oTHERcomp (QUOTE VERYSAFESLOT)))
␈↓ ↓H␈βJ␈¬ NoEntry]
␈↓ ↓H␈βh␈¬38*ok
␈↓ ↓H␈β
ε␈¬Nothing changed.
␈↓ ↓H␈β
$␈¬Father
␈↓ βT␈β
}␈¬↓<<<< 20. There is a unit for Composition: >>>>
␈↓ ↓H␈β∞:␈¬26←EDITU(Composition]
␈↓ ↓H␈β∞X␈¬edit
␈↓ ↓H␈β∞v␈¬64*pp
␈↓ ↓H␈β∂∀␈¬(Isa (AnySlotCombiner)
␈↓ ↓H␈β∂2␈¬ Descr (Compose S1 of S2 of ... of Sn the unit)
␈↓ ↓⊗␈β↓↓␈¬G-18
␈↓ ↓H␈β↓H␈¬ FnForCaching NoEntry
␈↓ ↓H␈β↓f␈¬ FnForUpdating [LAMBDA (affectedslt fullHLD changedslt argnames hold)
␈↓ ↓H␈βα∧␈¬ (OR [MAPCONC (REVERSE (CDR fullHLD))
␈↓ ↓H␈βα"␈¬ (FUNCTION (LAMBDA (slt morework)
␈↓ ↓H␈βα@␈¬ (PROG1 (COND
␈↓ ↓H␈βα↑␈¬ [(LISTP slt)
␈↓ ↓H␈βα|␈¬ (COND
␈↓ ↓H␈ββ~␈¬ [hold (AND (SETQ morework
␈↓ ↓H␈ββ8␈¬ (UpdateASUIB
␈↓ ↓H␈ββV␈¬ slt changedslt
␈↓ ↓H␈ββt␈¬ (CONS (QUOTE x)
␈↓ ↓H␈β∧∩␈¬ (CDR argnames))
␈↓ ↓H␈β∧0␈¬ affectedslt))
␈↓ ↓H␈β∧N␈¬ (DoToEachFn
␈↓ ↓H␈β∧l␈¬ (COND
␈↓ ↓H␈β¬
␈¬ ((CDR hold)
␈↓ ↓H␈β¬(␈¬ (CONS (QUOTE Composition)
␈↓ ↓H␈β¬F␈¬ hold))
␈↓ ↓H␈β¬d␈¬ (T (CAR hold)))
␈↓ ↓H␈βεα␈¬ changedslt argnames
␈↓ ↓H␈βε ␈¬ (ConsN (QUOTE LAMBDA)
␈↓ ↓H␈βε>␈¬ (QUOTE (x))
␈↓ ↓H␈βε\␈¬ morework]
␈↓ ↓H␈βεz␈¬ (T (UpdateASUIB slt changedslt argnames
␈↓ ↓H␈βπ_␈¬ affectedslt]
␈↓ ↓H␈βπ6␈¬ [(EQ slt changedslt)
␈↓ ↓H␈βπT␈¬ (COND
␈↓ ↓H␈βπr␈¬ (hold (InvalidateInverseFn
␈↓ ↓H␈βλ⊂␈¬ (COND
␈↓ ↓H␈βλ.␈¬ ((CDR hold)
␈↓ ↓H␈βλL␈¬ (CONS (QUOTE Composition)
␈↓ ↓H␈βλj␈¬ hold))
␈↓ ↓H␈β λ␈¬ (T (CAR hold)))
␈↓ ↓H␈β &␈¬ affectedslt changedslt argnames))
␈↓ ↓H␈β D␈¬ (T (InvalidateFn affectedslt changedslt
␈↓ ↓H␈β b␈¬ argnames]
␈↓ ↓H␈β
␈¬ (T NIL))
␈↓ ↓H␈β
≡␈¬ (SETQ hold (CONS slt hold]
␈↓ ↓H␈β
<␈¬ (LIST NIL]
␈↓ ↓H␈β
Z␈¬ CombinerFor (PossibleSlotsOfITypEx AllIsas AllExamples SuperTypEx* SubTypEx*)
␈↓ ↓H␈β
x␈¬ Defn [LAMBDA (slotlist args)
␈↓ ↓H␈β⊗␈¬ (SETQ slotlist ([LAMBDA (**SELF**)
␈↓ ↓H␈β4␈¬ (APPLY* (GetValue (QUOTE Composition)
␈↓ ↓H␈βR␈¬ (QUOTE ToParseParts)
␈↓ ↓H␈βp␈¬ (QUOTE (VERYSAFESLOT VERYSAFEUNIT)))
␈↓ ↓H␈β∞␈¬ slotlist]
␈↓ ↓H␈β,␈¬ NIL))
␈↓ ↓H␈βJ␈¬ (PROG (walker answer isLIST)
␈↓ ↓H␈βh␈¬ (SETQ walker (REVERSE slotlist))
␈↓ ↓H␈β
ε␈¬ (SETQ answer (GetGetVal (CAR walker)
␈↓ ↓H␈β
$␈¬ (QUOTE uNITcomp)
␈↓ ↓H␈β
B␈¬ (QUOTE oTHERcomp)))
␈↓ ↓H␈β
`␈¬ [SETQ isLIST (ListFormat (HardFormat (CAR walker]
␈↓ ↓H␈β
}␈¬ LOOP(COND
␈↓ ↓H␈β∞≤␈¬ ((CDR walker)
␈↓ ↓H␈β∞:␈¬ (SETQ walker (CDR walker))
␈↓ ↓H␈β∞X␈¬ (SETQ answer (ComposeAux (CAR walker)
␈↓ ↓H␈β∞v␈¬ answer
␈↓ ↓H␈β∂∀␈¬ (QUOTE oTHERcomp)))
␈↓ ↓H␈β∂2␈¬ (GO LOOP))
␈↓ ∞␈β↓↓␈¬G-19
␈↓ ↓H␈β↓H␈¬ (T (RETURN (LIST [LIST (QUOTE LAMBDA)
␈↓ ↓H␈β↓f␈¬ (QUOTE (uNITcomp sLOTcomp oTHERcomp))
␈↓ ↓H␈βα∧␈¬ (LIST (QUOTE OR)
␈↓ ↓H␈βα"␈¬ (IsOk answer)
␈↓ ↓H␈βα@␈¬ (COND
␈↓ ↓H␈βα↑␈¬ (isLIST (QUOTE NoEntries))
␈↓ ↓H␈βα|␈¬ (T (QUOTE NoEntry]
␈↓ ↓H␈ββ~␈¬ [CONS (COND
␈↓ ↓H␈ββ8␈¬ (isLIST (QUOTE FSet))
␈↓ ↓H␈ββV␈¬ (T (QUOTE FSingleton)))
␈↓ ↓H␈ββt␈¬ (CDR (RangeTypeOf (CAR slotlist]
␈↓ ↓H␈β∧∩␈¬ (DomainTypeOf (CAR (LAST slotlist)))
␈↓ ↓H␈β∧0␈¬ (QUOTE PSEUDO-SLOT]
␈↓ ↓H␈β∧N␈¬ FnForInverting [LAMBDA (hldefn temp)
␈↓ ↓H␈β∧l␈¬ (AND [EVERY (CDR hldefn)
␈↓ ↓H␈β¬
␈¬ (FUNCTION (LAMBDA (x pmet)
␈↓ ↓H␈β¬(␈¬ (AND (SETQ pmet (InvertHLD x))
␈↓ ↓H␈β¬F␈¬ (SETQ temp (CONS pmet temp]
␈↓ ↓H␈β¬d␈¬ (CONS (QUOTE Composition)
␈↓ ↓H␈βεα␈¬ temp]
␈↓ ↓H␈βε ␈¬ RangeType (FSingleton SlotType)
␈↓ ↓H␈βε>␈¬ GetFnsUsed [LAMBDA (hld sc)
␈↓ ↓H␈βε\␈¬ (CONS (CAR hld)
␈↓ ↓H␈βεz␈¬ (MapUnion (CDR hld)
␈↓ ↓H␈βπ_␈¬ (FUNCTION (LAMBDA (term)
␈↓ ↓H␈βπ6␈¬ (AND (LISTP term)
␈↓ ↓H␈βπT␈¬ (GetAllFNS term]
␈↓ ↓H␈βπr␈¬ DefnUsedBy (AllIsas)
␈↓ ↓H␈βλ⊂␈¬ GetCVsUsed [LAMBDA (hld sc)
␈↓ ↓H␈βλ.␈¬ (OR [MapUnion (CDR hld)
␈↓ ↓H␈βλL␈¬ (FUNCTION (LAMBDA (term)
␈↓ ↓H␈βλj␈¬ (COND
␈↓ ↓H␈β λ␈¬ ((ATOM term)
␈↓ ↓H␈β &␈¬ (LIST term))
␈↓ ↓H␈β D␈¬ (T (GetAllCVs term]
␈↓ ↓H␈β b␈¬ NoEntries]
␈↓ ↓H␈β
␈¬ AllIsas (AnySlotListFn AnyStorableFn AnyProcess Anything AnyCT&U AnyFunction
␈↓ β8␈β
≡␈¬ AnyUnitListFn AnyFunctional AnySlotCombiner)
␈↓ ↓H␈β
<␈¬ Prototypes (TypicalSlotCombiner TypicalSlotListFn TypicalStorableFn
␈↓ α_␈β
Z␈¬ TypicalFunctional TypicalFunction TypicalProcess TypicalCT&U
␈↓ α_␈β
x␈¬ TypicalThing)
␈↓ ↓H␈β⊗␈¬ MySlotsNowOrdered (OrderedPrototypes)
␈↓ ↓H␈β4␈¬ ToParseParts (LAMBDA (args) (MAPCAR args (FUNCTION HLDefnParser]
␈↓ ↓H␈βR␈¬64*ok
␈↓ ↓H␈βp␈¬Nothing changed.
␈↓ ↓H␈β∞␈¬Composition
␈↓ βs␈βJ␈¬↓<<<< 21. Examples of SlotCombiners >>>>
␈↓ α_␈β
ε␈¬{There are several exising slot combiners:}
␈↓ ↓H␈β
$␈¬6←(AllExamples 'AnySlotCombiner]
␈↓ ↓H␈β
B␈¬(Subsetting CommonXProd Intersecting FirstOk Starring Application
␈↓ ↓H␈β
`␈¬ Composition Tripple OrderedStarring OrderedComposition
␈↓ ↓H␈β
}␈¬ Unioning OrderedUnioning Plussing OneOf Soften PutInOrder
␈↓ ↓H␈β∞≤␈¬ Listing DoneIndirectly)
␈↓ α_␈β∞X␈¬{This class belongs in a subcategory of two more general classes:}
␈↓ ↓H␈β∞v␈¬7←SuperClass(AnySlotCombiner]
␈↓ ↓H␈β∂∀␈¬(AnySlotListFn AnyFunctional>
␈↓ ↓⊗␈β↓↓␈¬G-20
␈↓ α_␈β↓H␈¬{The first contains units which represent functions which each take a
␈↓ α_␈β↓f␈¬ list of slots as its argument.
␈↓ α_␈βα∧␈¬ It, in turn is a subclass of AnyUnitListFunction - i.e. functions
␈↓ α_␈βα"␈¬ which take a list of units as arguments.
␈↓ α_␈βα@␈¬The second contains those "functions" which return, as a value,
␈↓ α_␈βα↑␈¬ another function. This category also includes, for example,
␈↓ α_␈βα|␈¬ logical-operators, which map a list of predicates into a new predicate,
␈↓ α_␈ββ~␈¬ which returns T, e.g., when each of those predicates would return T.
␈↓ α_␈ββ8␈¬Appendix C shows these classes in more detail.}
␈↓ β;␈ββt␈¬↓<<<< 22. What else can we say about Father? >>>>
␈↓ ↓H␈β∧0␈¬90←RangeType(Father]
␈↓ ↓H␈β∧l␈¬[FSingleton (UnitType (L-AND (*P AnyPerson)
␈↓ ↓H␈β¬
␈¬ (SlotVal Gender Male]
␈↓ α_␈β¬F␈¬{Let's see if we're allowed to say "HisMother" is someone's Father}
␈↓ ↓H␈β¬d␈¬91←(PutValue 'Visitor 'Father 'HisMother]
␈↓ ↓H␈βεα␈¬NIL
␈↓ ∧R␈βε>␈¬↓<<<< 23. Far too quiet: >>>>
␈↓ ↓H␈βεz␈¬ Isn't that annoying? It would especially even more so if we didn't know
␈↓ ↓H␈βπ_␈¬ why this function failed.
␈↓ ↓H␈βπ6␈¬ (Here, it's because Father must be Male, and "HisMother" isn't.]
␈↓ ↓H␈βπT␈¬ Let's make it noisier -- in fact, let's create a whole new class of slots,
␈↓ ↓H␈βπr␈¬ which are more informative.
␈↓ ↓H␈βλ⊂␈¬ To see how it will work, let us first see how PutValue really works:
␈↓ β∪␈βλL␈¬↓<<<< 24. How do accessing functions really work? >>>>
␈↓ ↓H␈β λ␈¬95←PP(PutValue]
␈↓ ↓H␈β &␈¬loading from <CSD.RLL>UTIL..7
␈↓ ↓H␈β b␈¬(PutValue
␈↓ ↓H␈β
␈¬ [LAMBDA (uNIT sLOT Val old why) **COMMENT** **COMMENT** **COMMENT**
␈↓ ↓H␈β
≡␈¬ (APPLY* (GetAccessFn sLOT (QUOTE ToPutValue)
␈↓ ↓H␈β
<␈¬ (QUOTE (VERYSAFESLOT))
␈↓ ↓H␈β
Z␈¬ (QUOTE UA-DELSLOT))
␈↓ ↓H␈β
x␈¬ uNIT sLOT Val old why])
␈↓ ↓H␈β⊗␈¬(PutValue)
␈↓ α_␈βR␈¬{So you see, it basically just goes to the slot, and asks it how
␈↓ α_␈βp␈¬ put a value.
␈↓ α_␈β∞␈¬ It applies the result of that GetAccessFn call on its list of arguments}
␈↓ ↓H␈βJ␈¬96←PP(GetAccessFn]
␈↓ ↓H␈βh␈¬loading from <CSD.RLL>RLL..6
␈↓ ↓H␈β
$␈¬(GetAccessFn
␈↓ ↓H␈β
B␈¬ [LAMBDA (sLOT thisslot oTHER dftfn) **COMMENT** **COMMENT**
␈↓ ↓H␈β
`␈¬ (OR (MEMB (QUOTE IMPURE)
␈↓ ↓H␈β
}␈¬ oTHER)
␈↓ ↓H␈β∞≤␈¬ (SETQ uContext sLOT))
␈↓ ↓H␈β∞:␈¬ (SET (COND
␈↓ ↓H␈β∞X␈¬ ((MEMB (QUOTE IMPURE)
␈↓ ↓H␈β∞v␈¬ oTHER)
␈↓ ↓H␈β∂∀␈¬ (QUOTE uValue))
␈↓ ↓H␈β∂2␈¬ (T (QUOTE oTHER)))
␈↓ ∞␈β↓↓␈¬G-21
␈↓ ↓H␈β↓H␈¬ (OR (IsOk (UA-GETVALUE sLOT thisslot))
␈↓ ↓H␈β↓f␈¬ (IsOk (FindDefault sLOT thisslot oTHER))
␈↓ ↓H␈βα∧␈¬ (CheckDefn (Warning (CONCAT "Unable to find the " thisslot
␈↓ ↓H␈βα"␈¬ " slot of "
␈↓ ↓H␈βα@␈¬ sLOT ". Perhaps it is not a unit?")))
␈↓ ↓H␈βα↑␈¬ dftfn
␈↓ ↓H␈βα|␈¬ (QUOTE NoOp])
␈↓ ↓H␈ββ~␈¬(GetAccessFn)}}
␈↓ α_␈ββV␈¬{Essentially this sees if there is a value stored on sLOT:thisslot
␈↓ α_␈ββt␈¬ If so, it uses that value. Otherwise, it calls FindDefault, which}
␈↓ ∧↓␈β∧N␈¬↓<<<< 25. The FindDefault function: >>>>
␈↓ ↓H␈β¬
␈¬97←PP(FindDefault]
␈↓ ↓H␈β¬(␈¬loading from <CSD.RLL>RLL..6
␈↓ ↓H␈β¬d␈¬(FindDefault
␈↓ ↓H␈βεα␈¬ [LAMBDA (uUNIT uSLOT oTHERs) **COMMENT**
␈↓ ↓H␈βε ␈¬ (AND (Slotp uSLOT)
␈↓ ↓H␈βε>␈¬ (MapUntilOk [GetValue uUNIT (QUOTE OrderedPrototypes)
␈↓ ↓H␈βε\␈¬ (AddOnCharacter oTHERs
␈↓ ↓H␈βεz␈¬ (QUOTE (VERYSAFESLOT SAFE
␈↓ ↓H␈βπ_␈¬ FAST-GET
␈↓ ↓H␈βπ6␈¬ FAST-CACHE]
␈↓ ↓H␈βπT␈¬ (FUNCTION (LAMBDA (x)
␈↓ ↓H␈βπr␈¬ (FindValue (UA-GETVALUE x uSLOT)
␈↓ ↓H␈βλ⊂␈¬ x uSLOT oTHERs])
␈↓ ↓H␈βλ.␈¬(FindDefault)
␈↓ α_␈βλj␈¬{This scans through the unit's OrderedPrototypes,
␈↓ α_␈β λ␈¬ returning the first value, V, which is nonNIL.}
␈↓ ↓H␈β D␈¬98←(FindDefault 'Father 'ToPutValue]
␈↓ ↓H␈β b␈¬DefaultPutValue
␈↓ α_␈β
≡␈¬{Note this is the value stored on TypicalSlot:ToPutValue}
␈↓ ↓H␈β
Z␈¬100←EDITU(TypicalSlot]
␈↓ ↓H␈β
x␈¬edit
␈↓ ↓H␈β⊗␈¬40*f ToPutValue
␈↓ ↓H␈β4␈¬41*p
␈↓ ↓H␈βR␈¬... ToPutValue DefaultPutValue
␈↓ ↓H␈βp␈¬ AfterPutValue DefaultAfterPutValue
␈↓ ↓H␈β∞␈¬ BeforePutValue DefaultBeforePutValue
␈↓ ↓H␈β,␈¬ BeforeGetValue DefaultBeforeGetValue
␈↓ ↓H␈βJ␈¬ AfterGetValue DefaultAfterGetValue
␈↓ ↓H␈βh␈¬ ToAddValue DefaultAddValue
␈↓ ↓H␈β
ε␈¬ ToDeleteValue DefaultDeleteValue
␈↓ ↓H␈β
$␈¬ ToKillValue DefaultKillValue
␈↓ ↓H␈β
B␈¬ ToSubstValue DefaultSubstValue ...
␈↓ α_␈β
}␈¬{Note also BeforePutValue and AfterPutValue's values}
␈↓ ↓H␈β∞:␈¬45*ok
␈↓ ↓H␈β∞X␈¬Nothing changed.
␈↓ ↓H␈β∞v␈¬TypicalSlot
␈↓ ∧q␈β∂2␈¬↓<<<< 26. Strategy: >>>>
␈↓ ↓⊗␈β↓↓␈¬G-22
␈↓ ↓H␈β↓f␈¬ What we must do is intercept this FindDefault.
␈↓ ↓H␈βα∧␈¬ First, we will write the function which actually prints the desired message.
␈↓ ↓H␈βα"␈¬ Then create a whole new class of types of slots, which will, by default,
␈↓ ↓H␈βα@␈¬ use this chattier put value.
␈↓ αn␈βα|␈¬↓<<<< 27. What gets done when? - system dependent fns >>>>
␈↓ α_␈ββ8␈¬{First, rewrite the appropriate function, to report Type Errors
␈↓ α_␈ββV␈¬ Need to see what DefaultPutValue does:}
␈↓ ↓H␈β∧∩␈¬3←PP(DefaultPutValue]
␈↓ ↓H␈β∧0␈¬loading from <CSD.RLL>RLL..6
␈↓ ↓H␈β∧l␈¬(DefaultPutValue
␈↓ ↓H␈β¬
␈¬ [LAMBDA (uNIT sLOT newValue oldValue why sltputter) **COMMENT**
␈↓ ↓H␈β¬(␈¬ {{[OR why (SETQ why (LIST (QUOTE UserCommand]
␈↓ ↓H␈β¬F␈¬ (OR oldValue (SETQ oldValue (UA-GETVALUE uNIT sLOT))) }}
␈↓ ↓H␈β¬d␈¬ (AND (OR (MEMB (QUOTE Fast-Put) why)
␈↓ α_␈βεα␈¬ (APPLY* (GetAccessFn sLOT (QUOTE BeforePutValue))
␈↓ αh␈βε ␈¬ uNIT sLOT oldValue (CONS (QUOTE NewVal) newValue)
␈↓ ↓H␈βε>␈¬ why))
␈↓ ↓H␈βε\␈¬ [IsOk (SETQ sltputter (GetValue (GetValue sLOT (QUOTE Format)
␈↓ ↓H␈βεz␈¬ (QUOTE (VERYSAFESLOT SAFE)))
␈↓ ↓H␈βπ_␈¬ (QUOTE FnForPutting)
␈↓ ↓H␈βπ6␈¬ (QUOTE (VERYSAFESLOT SAFE]
␈↓ ↓H␈βπT␈¬ [SETQ newValue (COND
␈↓ ↓H␈βπr␈¬ ((MustComputep newValue)
␈↓ ↓H␈βλ⊂␈¬ (UA-DELSLOT uNIT sLOT)
␈↓ ↓H␈βλ.␈¬ RecomputeMe)
␈↓ ↓H␈βλL␈¬ ((FormattedValuep oldValue)
␈↓ ↓H␈βλj␈¬ (APPLY* (GetValue (ValueFormat oldValue)
␈↓ ↓H␈β λ␈¬ (QUOTE FnForPutting)
␈↓ ↓H␈β &␈¬ (QUOTE (VERYSAFESLOT)))
␈↓ ↓H␈β D␈¬ uNIT sLOT newValue oldValue why sltputter))
␈↓ ↓H␈β b␈¬ ((FormattedValuep newValue)
␈↓ ↓H␈β
␈¬ (APPLY* (GetValue (ValueFormat newValue)
␈↓ ↓H␈β
≡␈¬ (QUOTE FnForPutting)
␈↓ ↓H␈β
<␈¬ (QUOTE (VERYSAFESLOT)))
␈↓ ↓H␈β
Z␈¬ uNIT sLOT newValue oldValue why sltputter))
␈↓ ↓H␈β
x␈¬ (T (APPLY* sltputter uNIT sLOT newValue oldValue why]
␈↓ ↓H␈β⊗␈¬ (OR (MEMB (QUOTE Fast-Put)
␈↓ ↓H␈β4␈¬ why)
␈↓ ↓H␈βR␈¬ (APPLY* (GetAccessFn sLOT (QUOTE AfterPutValue))
␈↓ ↓H␈βp␈¬ uNIT sLOT newValue (CONS (QUOTE OldVal)
␈↓ ↓H␈β∞␈¬ oldValue)
␈↓ ↓H␈β,␈¬ why))
␈↓ ↓H␈βJ␈¬ newValue])
␈↓ ↓H␈βh␈¬(DefaultPutValue)
␈↓ α_␈β
$␈¬{In effect, this first calls (GetAccessSlot slot 'BeforePutValue)
␈↓ α_␈β
B␈¬ on the arguments.
␈↓ α_␈β
`␈¬ If that returns nonNIL, it does the put,
␈↓ α_␈β
}␈¬ and finally (if that also returned nonNIL)
␈↓ α_␈β∞≤␈¬ calls (GetAccessSlot slot 'AfterPutValue) on the arguments.}
␈↓ ↓H␈β∞X␈¬4←GetAccessSlot(Father BeforePutValue]
␈↓ ↓H␈β∞v␈¬DefaultBeforePutValue
␈↓ α_␈β∂2␈¬{Recall this appears on TypicalSlot, way above.}
␈↓ ∞␈β↓↓␈¬G-23
␈↓ ↓H␈β↓f␈¬5←FindDefault(Father AfterPutValue]
␈↓ ↓H␈βα∧␈¬DefaultAfterPutValue
␈↓ α_␈βα@␈¬{ditto}
␈↓ ↓H␈βα|␈¬6←PP(DefaultBeforePutValue]
␈↓ ↓H␈ββ~␈¬loading from <CSD.RLL>RLL..6
␈↓ ↓H␈ββV␈¬(DefaultBeforePutValue
␈↓ ↓H␈ββt␈¬{{ [LAMBDA (un sl old modif why) **COMMENT**
␈↓ ↓H␈β∧∩␈¬ (COND
␈↓ ↓H␈β∧0␈¬ ([OR (MEMB (QUOTE UserCommand)
␈↓ ↓H␈β∧N␈¬ why)
␈↓ ↓H␈β∧l␈¬ (MEMB (QUOTE UserEdits)
␈↓ ↓H␈β¬
␈¬ why)
␈↓ ↓H␈β¬(␈¬ (AND (MEMB (QUOTE New-Unit)
␈↓ ↓H␈β¬F␈¬ why)
␈↓ ↓H␈β¬d␈¬ (NOT (EQUAL (CDR modif)
␈↓ ↓H␈βεα␈¬ old]
␈↓ ↓H␈βε ␈¬ (DefaultVerifyValue un sl old modif why))
␈↓ ↓H␈βε>␈¬ (T modif])}}
␈↓ ↓H␈βε\␈¬(DefaultBeforePutValue)
␈↓ α_␈βπ_␈¬{Aha - DefaultVerifyValue looks like the function which attempts to verify
␈↓ α_␈βπ6␈¬ that a value is reasonable.
␈↓ α_␈βπT␈¬ (Note it only does this if this is a user edit, ...,
␈↓ α_␈βπr␈¬ as it trusts its own puts...)}
␈↓ ↓H␈βλ.␈¬7←(DefaultVerifyValue 'Visitor 'Father NIL '(NewVal . HerHusband]
␈↓ ↓H␈βλL␈¬T
␈↓ ↓H␈β λ␈¬8←(DefaultVerifyValue 'Visitor 'Father NIL '(NewVal . HisMother]
␈↓ ↓H␈β &␈¬NIL
␈↓ α_␈β b␈¬{Yep, that's the place. So}
␈↓ ∧
␈β
<␈¬↓<<<< 28. Creating a new function >>>>
␈↓ ↓H␈β
x␈¬9←MOVD(DefaultBeforePutValue ChattyBPV T]
␈↓ ↓H␈β4␈¬loading from <CSD.RLL>RLL..6
␈↓ ↓H␈βR␈¬Please enter the Knowledge Base in which to store ChattyBPV: GENLINFO
␈↓ ↓H␈βp␈¬"ChattyBPV defined using Interpreted Code for DefaultBeforePutValue"
␈↓ α_␈β,␈¬{(Note I've advised MOVD to be smart - copying the source code rather
␈↓ α_␈βJ␈¬ than the compiled code;
␈↓ α_␈βh␈¬ and asking where to store this new function.
␈↓ α_␈β
ε␈¬ [This is a simple database management facility.]
␈↓ α_␈β
$␈¬ I told it to store this function in the list associated
␈↓ α_␈β
B␈¬ with the GENLINFO kb.}
␈↓ ↓H␈β
}␈¬10←EDITF(ChattyBPV]
␈↓ ↓H␈β∞≤␈¬edit
␈↓ ↓H␈β∞:␈¬52*-1 2 p
␈↓ ↓H␈β∞X␈¬((OR & & &) (DefaultVerifyValue un sl old modif why))
␈↓ ↓H␈β∞v␈¬53*-1 p
␈↓ ↓H␈β∂∀␈¬(DefaultVerifyValue un sl old modif why)
␈↓ ↓⊗␈β↓↓␈¬G-24
␈↓ ↓H␈β↓H␈¬53*mbd (OR * (PROGN (WRITELNTTY "Unable to put " (CDR modif) " onto " un
␈↓ α_␈β↓f␈¬":" sl " because of a type error!!!") NIL]
␈↓ ↓H␈βα"␈¬55*pp
␈↓ ↓H␈βα@␈¬(OR (DefaultVerifyValue un sl old modif why)
␈↓ ↓H␈βα↑␈¬ (PROGN (WRITELNTTY "Unable to put " & " onto " un ":" sl
␈↓ ↓H␈βα|␈¬" because of a type error!!!"))
␈↓ ↓H␈ββ~␈¬58*ok
␈↓ ↓H␈ββV␈¬ChattyBPV
␈↓ β↔␈β∧∩␈¬↓<<<< 29. New class of types of slots - ChattySlots >>>>
␈↓ α_␈β∧N␈¬{First, let me show you NewSubClass:}
␈↓ ↓H␈β¬
␈¬93←PP(NewSubClass]
␈↓ ↓H␈β¬(␈¬loading from <CSD.RLL>UTIL..7
␈↓ ↓H␈β¬d␈¬(NewSubClass
␈↓ ↓H␈βεα␈¬ [LAMBDA (UNAM UOLD whichKB) **COMMENT** **COMMENT**
␈↓ ↓H␈βε ␈¬ (NewUnit UNAM UOLD (QUOTE ISubClass)
␈↓ ↓H␈βε>␈¬ whichKB])
␈↓ ↓H␈βεz␈¬(NewSubClass)
␈↓ α_␈βπ6␈¬{Recall "ISubClass" was an `inheritance' unit we saw long ago.}
␈↓ ↓H␈βπr␈¬94←NewSubClass)
␈↓ ↓H␈βλ⊂␈¬Name: AnyChattySlot
␈↓ ↓H␈βλ.␈¬Is a ISubClass of: AnySlot
␈↓ ↓H␈βλL␈¬Please enter the Knowledge Base in which to store AnyChattySlot: GENLINFO
␈↓ ↓H␈β λ␈¬ * Initialized AnyChattySlot *
␈↓ ↓H␈β &␈¬edit
␈↓ ↓H␈β D␈¬39*p
␈↓ ↓H␈β b␈¬(Isa (AnyClassOfObjects)
␈↓ ↓H␈β
␈¬ AllIsas (AnyCT&U Anything AnyClassOfObjects)
␈↓ ↓H␈β
≡␈¬ Prototypes (TypicalClass TypicalCT&U TypicalThing)
␈↓ ↓H␈β
<␈¬ MySlotsNowOrdered (OrderedPrototypes)
␈↓ ↓H␈β
Z␈¬ MyCreatedAs (ISubClass &)
␈↓ ↓H␈β
x␈¬ MyTimeOfCreation "18-Aug-80 17:03:13"
␈↓ ↓H␈β⊗␈¬ MyCreator "NewUser"
␈↓ ↓H␈β4␈¬ TotalSoFar 0
␈↓ ↓H␈βR␈¬ SuperClass (AnySlot)
␈↓ ↓H␈βp␈¬ MySensibleSlots (Descr Characteristics Prototypes AllSpecs AllGenls AllIsas
␈↓ αh␈β∞␈¬ Isa OrderedPrototypes Specializations MySlots MyCreatedAs
␈↓ αh␈β,␈¬ MySensibleSlots MySlotsNowOrdered MyEssentialVirtualSlots
␈↓ αh␈βJ␈¬ MyToRenameMe MyToKillMe MyTimeOfCreation MyCreator TotalSoFar --))
␈↓ ↓H␈β
ε␈¬39*ok
␈↓ ↓H␈β
$␈¬Verifying slots
␈↓ ↓H␈β
B␈¬AnyChattySlot
␈↓ α_␈β
}␈¬{To make every example of AnyChattySlot print more instructive messages,
␈↓ α_␈β∞≤␈¬ (instead of just returning NIL,)
␈↓ α_␈β∞:␈¬ we have to intercept FindDefault's search for BeforePutValue.
␈↓ α_␈β∞X␈¬ This will happen if there is a TypicalChattySlot, which has a
␈↓ α_␈β∞v␈¬ BeforePutValue value stored.
␈↓ α_␈β∂2␈¬So now to create that unit:}
␈↓ ∞␈β↓↓␈¬G-25
␈↓ αs␈β↓f␈¬↓<<<< 30. Create a new typical member of AnyChattySlot >>>>
␈↓ α_␈βα"␈¬{Now to create the TypicalChattySlot unit, and use this new
␈↓ α_␈βα@␈¬ ChattyBPV function for its BeforePutValue value}
␈↓ ↓H␈βα|␈¬2←NewTypEx(TypicalChattySlot AnyChattySlot GENLINFO]
␈↓ ↓H␈ββ~␈¬ * Initialized TypicalChattySlot *
␈↓ ↓H␈ββ8␈¬edit
␈↓ ↓H␈ββV␈¬40*p
␈↓ ↓H␈ββt␈¬(Isa (AnyArchetype)
␈↓ ↓H␈β∧∩␈¬ TypicalExampleOf AnyChattySlot
␈↓ ↓H␈β∧0␈¬ NewPossibleSlots NoEntries
␈↓ ↓H␈β∧N␈¬ ... )
␈↓ ↓H␈β¬
␈¬41*(n BeforePutValue ChattyBPV]
␈↓ ↓H␈β¬F␈¬42*ok
␈↓ ↓H␈β¬d␈¬Verifying slots
␈↓ ↓H␈βεα␈¬TypicalChattySlot
␈↓ α_␈βε>␈¬{Now all examples of AnyChattySlot will report such errors. Pf:
␈↓ α_␈βε\␈¬ First, the unaltered Husband:}
␈↓ ↓H␈βπ_␈¬11←(GetValue 'Husband 'Prototypes]
␈↓ ↓H␈βπ6␈¬(TypicalVirtualSlot TypicalUnitFn TypicalStorableFn TypicalProcess TypicalThing
␈↓ ↓H␈βπT␈¬ TypicalCT&U TypicalFunction TypicalSlot)
␈↓ α_␈βλ⊂␈¬{Note Husband's Prototypes, of course, omits TypicalChattySlot}
␈↓ ↓H␈βλL␈¬12←(PutValue 'Visitor 'Husband 'HisMother]
␈↓ ↓H␈βλj␈¬NIL
␈↓ α_␈β &␈¬{Now move Husband over}
␈↓ ↓H␈β b␈¬13←(PutValue 'Husband 'Isa '(AnyChattySlot]
␈↓ ↓H␈β
␈¬(AnyChattySlot)
␈↓ α_␈β
<␈¬{Husband's Prototypes have been rewritten}
␈↓ ↓H␈β
x␈¬14←(GetValue 'Husband 'Prototypes]
␈↓ ↓H␈β⊗␈¬(TypicalChattySlot TypicalUnitFn TypicalStorableFn TypicalProcess TypicalThing
␈↓ ↓H␈β4␈¬ TypicalCT&U TypicalFunction TypicalSlot)
␈↓ ↓H␈βR␈¬15←redo 11
␈↓ ↓H␈βp␈¬Unable to put HisMother onto Visitor:Husband because of a type error!!!
␈↓ ↓H␈β∞␈¬NIL
␈↓ α_␈βJ␈¬{Ta daaa!}
␈↓ ↓H␈β
ε␈¬16←Examples(AnyChattySlot]
␈↓ ↓H␈β
$␈¬(Husband)
␈↓ ∧f␈β
`␈¬↓<<<< 31. Conclusion >>>>
␈↓ α_␈β
}␈¬{That's about all for now.}
␈↓ ↓H␈β∞:␈¬28←SYSOUT(DEMO]
␈↓ ↓H␈β∞X␈¬<3SCRATCH>DEMO.EXE.1
␈↓ ↓H␈β∂∀␈¬29←LOGOUT]
␈↓ ↓⊗␈β↓↓␈¬G-26
␈↓ ↓H␈β↓H␈¬It is now 18-Aug-80 17:37:40.
␈↓ ↓H␈β↓f␈¬Closing DribbleFile <CSD.IA>TRACE.AUG18.1
␈↓ ↓H␈βα"␈¬@ ; Now in the monitor.